mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
A refactor of the various visitors in DeclChecker in TypeCheckDecl.cpp is coming up next. Swift SVN r2000
16 lines
324 B
Swift
16 lines
324 B
Swift
// RUN: %swift -parse %s -verify -parse-as-library
|
|
|
|
struct X {
|
|
struct Inner : Proto {
|
|
}
|
|
struct Inner2 : Proto2 { // expected-error {{type 'Inner2' does not conform to protocol 'Proto2'}}
|
|
}
|
|
}
|
|
|
|
protocol Proto {
|
|
}
|
|
|
|
protocol Proto2 {
|
|
func f() // expected-note {{protocol requires function 'f' with type '() -> ()'}}
|
|
}
|