Files
swift-mirror/test/decl/protocol/protocols_in_library.swift
Doug Gregor faf1c45d14 Shuffle the files in the testsuite a bit to try to reflect language structure.
There's a lot more work to do here, but start to categorize tests
along the lines of what a specification might look like, with
directories (chapters) for basic concepts, declarations, expressions,
statements, etc.


Swift SVN r9958
2013-11-05 15:12:57 +00:00

16 lines
325 B
Swift

// RUN: %swift -parse %s -verify -parse-as-library
struct X {
struct Inner : Proto {
}
struct Inner2 : Proto2 { // expected-error {{type 'X.Inner2' does not conform to protocol 'Proto2'}}
}
}
protocol Proto {
}
protocol Proto2 {
def f() // expected-note {{protocol requires function 'f' with type '() -> ()'}}
}