Avatar
public protocol B { var bbb: Int { get set } static var initial: Self { get } } extension B { public var bbb: Int { get { return 1 } set { self = Self.initial } } } final class C : B { static var initial: C { return C() } } var c = C() print(ObjectIdentifier(c)) c.bbb = 1 print(ObjectIdentifier(c)) ObjectIdentifier(0x00007fe1f5e04930) ObjectIdentifier(0x00007fe1f5d113b0) (edited)