Presencable Protocol

I tried your explicit extension and yes it does compile. I think it's an unhandled bug, see the example with P protocol. I filed a bug report for you: [SR-9812] Disallow shadowing optional protocol members from user extensions · Issue #52232 · apple/swift · GitHub

To add on this, we absolutely want to be able to satisfy protocol requirements of optional members with non-optional implementation on types that conform to the protocol (see this post), but I think in your case you found a compiler bug since it allowed you to shadow a protocol member.


And to be crystal clear with everyone in public, I sincerely apologize if I got a little too heated in this thread. ;)

1 Like