// RUN: %swift -parse %s -verify protocol P { typealias A func generate() -> Int } func f(rhs: U) -> X { // expected-error {{use of undeclared type 'X'}} val g = rhs.generate() // expected-error {{'U' does not have a member named 'generate'}} } struct Zzz { subscript (a: Foo) -> Zzz { get: // expected-error {{expected '{' to start getter definition}} set: for i in value {} } } protocol _Collection { typealias IndexType typealias _Element subscript(i: IndexType) -> _Element {get} } protocol Collection : _Collection, Sequence { subscript(i: IndexType) -> GeneratorType.Element {get set } } func insertionSort (inout elements: C, i: C.IndexType) { // expected-error {{use of undeclared type 'Mutable'}} expected-error {{'IndexType' is not a member type of 'C'}} var x: C.GeneratorType.Element = elements[i] }