[swift-evolution] Proposal: Allows operator overloads in struct or classes based on return type

Robert Widmann devteam.codafi at gmail.com
Sat Dec 10 22:48:46 CST 2016


I remember mentioning this in a meeting once.  The old behavior (post 2.x-mid-operators-in-aggregates) did allow for this, the new one should too.

~Robert Widmann

2016/12/10 20:36、David Sweeris via swift-evolution <swift-evolution at swift.org> のメッセージ:

> 
>>> On Dec 10, 2016, at 5:29 PM, David Sweeris via swift-evolution <swift-evolution at swift.org> wrote:
>>> 
>>> 
>>> On Dec 10, 2016, at 4:54 PM, Tommaso Piazza via swift-evolution <swift-evolution at swift.org> wrote:
>>> 
>>> Hello,
>>> 
>>> I have written a small proposal that would allow overloads of operators in structs/classes non only based on the types of the operands but on the return type as well.
>>> 
>>> Please let me know you thoughts,
>>> /Tommaso
>>> 
>>> https://github.com/blender/swift-evolution/blob/proposal/overloads-return-type/NNNN-allow-operator-overloads-in-structs-or-classes-based-on-return-type.md
>> 
>> That seems like a bug to me… Dunno, maybe it’s intentional and I’m just not aware of the reasoning.
> 
> Actually, since the error message correctly parses the code, it probably is intentional… I don’t see the problem, myself, but I guess I’d have to know why it’s considered an error before judging whether I think we should remove the restriction.
> 
> - Dave Sweeris
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161210/cc7f74ad/attachment.html>


More information about the swift-evolution mailing list