p-x9 / AssociatedObject

🔗 Swift Macro for allowing variable declarations even in class extensions
MIT License
126 stars 3 forks source link

support `wiiSet` and `didSet` #7

Closed p-x9 closed 1 year ago

p-x9 commented 1 year ago

 @AssociatedObject(.OBJC_ASSOCIATION_COPY_NONATOMIC)
 public var hello: String = "こんにちは" {
     didSet {
         print("didSet")
     }
     willSet {
         print("willSet: \(newValue)")
     }
 }