[swift-evolution] [Pitch] Remove type inference for associated types

Douglas Gregor dgregor at apple.com
Wed Jun 29 00:54:25 CDT 2016



Sent from my iPhone

> On Jun 28, 2016, at 10:51 PM, Paulo Faria <paulo at zewo.io> wrote:
> 
> 
>> On Jun 29, 2016, at 2:48 AM, Austin Zheng <austinzheng at gmail.com> wrote:
>> 
>> If you tested it, there's a problem with the current behavior independent of associated type inference, and it should be fixed whether or not the proposal is accepted.
> 
> I don’t think it should be an error. Normally we can have any number of functions with the same name but different return types. By failing in this specific case would be like saying that when you implement a protocol with an associated type you can only return what’s defined in the associated type. I don’t think that should be the behaviour we expect.

This seems very related to the near-miss checking I mentioned in my other reply to Austin. 

  - Doug

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160628/112e7aa8/attachment.html>


More information about the swift-evolution mailing list