@guaranteed
の意味よく知らないです。 けど class
つけると リファレンス値の値渡しになるのかと思います。public protocol B : class { var bbb: Int { get set } static var initial: Self { get } } extension B { public var bbb: Int { get { return 1 } set { self = Self.initial } } }
test.swift:9:16: error: cannot assign to value: 'self' is immutable set { self = Self.initial } ~~~~ ^
class
付いてないと通る。