[swift-evolution] [Draft Proposal] Improve protocol inheritance behaviour
Nevin Brackett-Rozinsky
nevin.brackettrozinsky at gmail.com
Tue Mar 14 09:29:58 CDT 2017
The way I want things to work, “super” always calls the superclass’s method
with matching name and signature.
For the scenario you outlined, the superclass defines such a method, so it
gets called. For the situation relevant to this proposal, if the superclass
*obtains* such a method via default implementation of a protocol
requirement, I want exactly the same thing to happen.
Namely, when the subclass’s override calls “super”, I want the
superclass’s method with identical name and signature to be invoked. It
does not matter where the superclass *got* that method, all that matters is
the superclass *has* such a method, in which case it gets called.
Nevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170314/3425803a/attachment.html>
More information about the swift-evolution
mailing list