Commits

Chris Lattner committed e9d1857ca35
Fix rdar://21783216 QoI: Cannot convert {TYPE} to {SAME TYPE} which was reported here: https://twitter.com/jadengeller/status/619989059046240256 The underlying problem here is that the user was defining an associated type named "Type", and then trying to refer to it with stuff.Type. The problem is that stuff.Type is a reserved way to refer to the metatype. Solve this sort of confusion by banning type members named Type (and Protocol, while we're here) since forming a reference to them won't work. This produces a note that indicates that a backtick'd version of the identifier will work, since "stuff.`Type`" will correctly form the reference to it. This only bans type members named Type or Protocol, but we could consider banning all ValueDecls from being named Type or Protocol. Module qualification isn't widely used though, and metatypes of modules don't really make sense at the moment.