You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varbar1:Int{getset} // expected-note {{protocol requires property 'bar1' with type 'Int'; do you want to add a stub?}}
8
+
staticvarbar2:Int{getset} // expected-note {{protocol requires property 'bar2' with type 'Int'; do you want to add a stub?}}
9
+
varbar3:Int{getset} // expected-note {{protocol requires property 'bar3' with type 'Int'; do you want to add a stub?}}
10
+
staticprefixfunc^^^(value:Self)->Int // expected-note {{protocol requires function '^^^' with type '(ConformsToFoo) -> Int'; do you want to add a stub?}}
11
+
staticpostfixfunc^^^^(value:Self)->Int // expected-note {{protocol requires function '^^^^' with type '(ConformsToFoo) -> Int'; do you want to add a stub?}}
12
+
func bar4(closure:()throws->Int)rethrows // expected-note {{protocol requires function 'bar4(closure:)' with type '(() throws -> Int) throws -> ()'; do you want to add a stub?}}
13
+
varbar5:Int{getset} // expected-note {{protocol requires property 'bar5' with type 'Int'; do you want to add a stub?}}
14
+
static subscript(_ pos:Int)->Int{get} // expected-note {{protocol requires subscript with type '(Int) -> Int'; do you want to add a stub?}}
15
+
}
16
+
17
+
structConformsToFoo:Foo{ // expected-error {{type 'ConformsToFoo' does not conform to protocol 'Foo'}}
18
+
letbar1:Int // expected-note {{candidate is not settable, but protocol requires it}}{{3-6=var}}
19
+
varbar2:Int // expected-note {{candidate operates on an instance, not a type as required}}{{3-3=static }}
20
+
staticvarbar3:Int=1 // expected-note {{candidate operates on a type, not an instance as required}}{{3-10=}}
21
+
staticpostfixfunc^^^(value:ConformsToFoo)->Int{return0} // expected-error {{operator implementation without matching operator declaration}}
22
+
// expected-note@-1 {{candidate is postfix, not prefix as required}}{{10-17=prefix}}
23
+
staticprefixfunc^^^^(value:ConformsToFoo)->Int{return0} // expected-error {{operator implementation without matching operator declaration}}
24
+
// expected-note@-1 {{candidate is prefix, not postfix as required}}{{10-16=postfix}}
25
+
func bar4(closure:()throws->Int)throws{} // expected-note {{candidate is not 'rethrows', but protocol requires it}}{{40-46=rethrows}}
26
+
varbar5:Int{return0} // expected-note {{candidate is not settable, but protocol requires it}}{{none}}
27
+
subscript(_ pos:Int)->Int{return0} // expected-note {{candidate operates on an instance, not a type as required}}{{3-3=static }}
28
+
}
29
+
30
+
protocolFoo1{
31
+
subscript(value:Bool)->Bool{getset} // expected-note {{protocol requires subscript with type '(Bool) -> Bool'; do you want to add a stub?}}
32
+
}
33
+
34
+
structConformsToFoo1:Foo1{ // expected-error {{type 'ConformsToFoo1' does not conform to protocol 'Foo1'}}
35
+
subscript(value:Bool)->Bool{returnfalse} // expected-note {{candidate is not settable, but protocol requires it}}{{none}}
0 commit comments