给定类Obj,
原文链接:https://www.f2er.com/swift/318909.htmlclass Obj: NSObject { var x = "x" }
和它的子类Obj1,你如何更改var x的默认值?
简单地设置一个新的值将是最有意义的,但似乎错误出来…
class Obj1: Obj { var x = "y" }
❗️ Cannot override with a stored property ‘x’