class PMock: P {
...
private(set) var fooSetCallCount = 0
private var _foo: any P! { didSet { fooSetCallCount += 1 } }
var foo: any P {
get { return _foo }
set { _foo = newValue }
}
}
This is wrong. any P! must be (any P)!.
Expected
private(set) var fooSetCallCount = 0
private var _foo: (any P)! { didSet { fooSetCallCount += 1 } }
var foo: any P {
get { return _foo }
set { _foo = newValue }
}
Misc
Keep current behavior for non any marked protocol for legacy codes.
Add support for existential
any
.Current behavior
↓
This is wrong.
any P!
must be(any P)!
.Expected
Misc
Keep current behavior for non
any
marked protocol for legacy codes.