On Mar 16, 2016, at 4:56 PM, Joe Groff <jgr...@apple.com> wrote:
>> We shouldn’t infer it the requirement.
>> 
>> Rationale: I see this as analogous (in two ways) to why we don’t infer 
>> hashability of T in:
>> 
>> func f<T>(…) {
>>   let x : Dictionary<T, String>
>> }
> 
> However, we do infer the `T: Hashable` in a case like this:
> 
> func foo<T>(x: Dictionary<T, String>) {}
> 
> `typealias` feels similar to that to me. It doesn't have to be a global 
> analysis, just an analysis of the RHS of the typealias.

I consider the RHS of the typealias to be the “body” of the type alias, and 
parameters to be part of the “signature” of the funcdecl.

-Chris

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

Reply via email to