You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The underlying issue is SR-103, but note that the same is still true with protocol extensions that don't match requirements in the protocol. Overload resolution is done at compile time. Sometimes this is useful. (For instance, if the methods were implemented in completely separate libraries, they wouldn't interfere with one another.)
Additional Detail from JIRA
md5: 6525164d8137f24816d939df306a46ac
duplicates:
Issue Description:
Not sure if this intentional or a bug, but it make the use of protocol extensions seem dangerous IMO. Run the following playground code:
Expected output:
Actual output:
However, with the parent class eliminated:
the output is as expected:
So one must be conscious of the ancestry of the class in order to know if a method conforming to a protocol can be invoked or not.
The text was updated successfully, but these errors were encountered: