[swift-evolution] PITCH: Return a subclass for a protocol method without the need for an associatedtype
Karl
razielim at gmail.com
Wed Aug 31 22:03:02 CDT 2016
> On 31 Aug 2016, at 06:10, Sitton, Yogev via swift-evolution <swift-evolution at swift.org> wrote:
>
> That’s was my point.
> Two sets of rules for the same case in two different places.
> These should be unified.
>
> I’ll write the proposal and create a pull request.
>
>> On Aug 17, 2016, at 11:24 PM, Slava Pestov <spestov at apple.com <mailto:spestov at apple.com>> wrote:
>>
>>>
>>> On Aug 17, 2016, at 10:18 AM, Vladimir.S via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>
>>> But yes, strictly speaking 'make()->Circle?' conforms to protocol requirement 'make()->Shape?', it does returns 'Shape?', so I believe this should be treated as conformance to MyShapeProtocol protocol.
>>
>> I agree this should be made to work, especially since method overriding supports the exact same scenario.
>>
>> We have two sets of rules, implemented in two different places, for matching method overrides and protocol witnesses. We need to unify the rules and the code.
>>
>> Slava
Sounds like you could save yourself some trouble and just file a bug report instead?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160901/6c1ddc93/attachment.html>
More information about the swift-evolution
mailing list