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() // expected-note {{protocol requires function 'bar4()' with type '() -> ()'; do you want to add a stub?}}
13
+
func bar5(closure:()throws->Int)rethrows // expected-note {{protocol requires function 'bar5(closure:)' with type '(() throws -> Int) throws -> ()'; do you want to add a stub?}}
14
+
func bar6() // expected-note {{protocol requires function 'bar6()' with type '() -> ()'; 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
+
mutatingfunc bar4(){} // expected-note {{candidate is marked 'mutating' but protocol does not allow it}}{{3-12=}}
26
+
func bar5(closure:()throws->Int)throws{} // expected-note {{candidate is not 'rethrows', but protocol requires it}}{{40-46=rethrows}}
27
+
func bar6()throws{} // expected-note {{candidate throws, but protocol does not allow it}}{{15-22=}}
0 commit comments