[swift-evolution] [Accepted] SE-0048: Generic Type Aliases

Nicola Salmoria nicola.salmoria at gmail.com
Sat Apr 16 03:12:19 CDT 2016


> Proposal link: https://github.com/apple/swift-evolution/blob/master/proposals/0048-generic-typealias.md
> 
> The review of SE-0048 “Generic Type aliases” ran from March 24…29, 2016. The proposal received overwhelmingly positive feedback and has now been implemented for Swift 3.
> 
> - Doug

Is this actually implemented fully?

The constraints on the typealias type don’t seem to work in the latest development snapshot (2016-04-12a):

typealias StringDict<T> = Dictionary<T, String> // error: type 'T' does not conform to protocol 'Hashable'
typealias StringDict<T: Hashable> = Dictionary<T, String>   // error: type parameters may not be constrained in typealias argument list

—
Nicola



More information about the swift-evolution mailing list