>> On 23 Jan 2017, at 19:56, Slava Pestov <spes...@apple.com> wrote:
>> 
>>> class B: A {
>>>  var item: String { // subclass specialises 'item' by "overriding" the 
>>> protocol extension implementation
>> 
>> This is the problem. You’re not overriding the protocol extension version, 
>> you’re just shadowing it for the purposes of compile-time name lookup. Note 
>> that if you add the ‘override’ keyword here, the compiler complains because 
>> there’s nothing in the base class to override.

Yes, that's why I wrote overriding in quotes and also why I tried to use the 
word specialise in place of override. My beef is not really here; this really 
was just a preamble. My issue is with the fact that adding the declaration to 
the protocol doesn't solve the problem despite the fact that the property is 
then supposed to be dynamically dispatched but isn't.
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to