>> 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.
The RHS of a stored variable declaration is essentially its body, but we infer
types across that boundary. (Granted, not generic constraints since variables
can't be generic yet.)
--
Brent Royal-Gordon
Architechies
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution