> On 28 déc. 2016, at 10:52, Dave Abrahams via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> on Tue Dec 27 2016, Chris Lattner <clattner-AT-apple.com> wrote:
> 
>> it would be ambiguous to move the ‘throws’ keyword to the end of the
>> function type, because you'd get:
>> 
>>      let x : (_ a : Int) -> (_ b: Float) -> Double throws throws
> 
> I see.  
> 
> We *could* say that the "throws" keyword comes after the return type
> unless it's a function type, in which case it comes after the return
> type's parameter list
> 
>       let x : (_ a : Int) -> (_ b: Float) throws -> Double throws

I can’t parse this at all; which is which?
Could you illustrate this strange rule to return (a) a non-throwing function 
from a throwing function, and (b) a throwing function from a non-throwing 
function?

Cheers,
Guillaume Lessard

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to