File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class Bar : NonObjCProto { // expected-error {{type 'Bar' does not conform to pr
26
26
27
27
// Complain about unavailable witnesses (error in Swift 4, warning in Swift 3)
28
28
protocol P {
29
- func foo( bar: Foo ) // expected-note 2 {{requirement 'foo(bar:)' declared here}}
29
+ func foo( bar: Foo ) // expected-note 3 {{requirement 'foo(bar:)' declared here}}
30
30
}
31
31
32
32
struct ConformsToP : P { // expected-error{{type 'ConformsToP' does not conform to protocol 'P'}}
@@ -64,6 +64,14 @@ extension ConformsToP5: P {
64
64
func foo( bar: Foo ) { }
65
65
}
66
66
67
+ struct ConformsToP6 : P { } // expected-error{{type 'ConformsToP6' does not conform to protocol 'P'}}
68
+ // expected-error@-1 {{unavailable instance method 'foo(bar:)' was used to satisfy a requirement of protocol 'P'}}
69
+
70
+ @available ( * , unavailable)
71
+ extension ConformsToP6 {
72
+ func foo( bar: Foo ) { } // expected-note {{'foo(bar:)' declared here}}
73
+ }
74
+
67
75
@available ( * , unavailable)
68
76
enum UnavailableEnum {
69
77
struct ConformsToP6 : P {
You can’t perform that action at this time.
0 commit comments