Commits
Chris Lattner committed f0a960bbe44
dramatically improve error recovery when "typealias" keyword is used in a
class or struct conforming to a protocol. Now we produce a single error
with a fixit hint (rewriting to typealias). Before we produced:
t.swift:7:3: error: associated types can only be defined in a protocol; define a type or introduce a 'typealias' to satisfy an associated type requirement
associatedtype T = Int
^
t.swift:7:17: error: consecutive declarations on a line must be separated by ';'
associatedtype T = Int
^
;
t.swift:7:18: error: expected declaration
associatedtype T = Int
^
t.swift:6:7: error: type 'C' does not conform to protocol 'P'
class C : P {
^
t.swift:3:18: note: protocol requires nested type 'T'
associatedtype T
^