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
classWobbler:NSWobbling{ // expected-note{{candidate has non-matching type '()'}}
273
+
classWobbler:NSWobbling{
274
274
@objcfunc wobble(){}
275
275
276
276
func returnMyself()->Self{returnself} // expected-error{{non-'@objc' method 'returnMyself()' does not satisfy requirement of '@objc' protocol 'NSWobbling'}}{{none}}
@@ -280,7 +280,7 @@ class Wobbler : NSWobbling { // expected-note{{candidate has non-matching type '
280
280
extensionWobbler:NSMaybeInitWobble{ // expected-error{{type 'Wobbler' does not conform to protocol 'NSMaybeInitWobble'}}
281
281
}
282
282
283
-
@objcclassWobbler2:NSObject,NSWobbling{ // expected-note{{candidate has non-matching type '()'}}
Copy file name to clipboardExpand all lines: test/decl/protocol/conforms/fixit_stub.swift
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ protocol Protocol1 {
11
11
subscript(arg1:Int, arg2:Int)->String{getset} //expected-note{{protocol requires subscript with type '(Int, Int) -> String'; do you want to add a stub?}} {{27-27=\n func foo(arg1: Int, arg2: String) -> String {\n <#code#>\n \}\n\n func bar() throws -> String {\n <#code#>\n \}\n\n func generic<T>(t: T) {\n <#code#>\n \}\n\n required init(arg: Int) {\n <#code#>\n \}\n\n var baz: Int\n\n var baz2: Int\n\n subscript(arg: Int) -> String {\n <#code#>\n \}\n\n subscript(arg1: Int, arg2: Int) -> String {\n get {\n <#code#>\n \}\n set {\n <#code#>\n \}\n \}\n}}
12
12
}
13
13
14
-
classAdopter:Protocol1{ // expected-error{{type 'Adopter' does not conform to protocol 'Protocol1'}} expected-note{{candidate has non-matching type '()'}}
14
+
classAdopter:Protocol1{ // expected-error{{type 'Adopter' does not conform to protocol 'Protocol1'}}
15
15
}
16
16
17
17
@@ -26,7 +26,7 @@ protocol Protocol2 {
26
26
subscript(arg1:Int, arg2:Int)->String{getset} //expected-note{{protocol requires subscript with type '(Int, Int) -> String'; do you want to add a stub?}} {{32-32=\n func foo(arg1: Int, arg2: String) -> String {\n <#code#>\n \}\n\n func bar() throws -> String {\n <#code#>\n \}\n\n var baz: Int {\n <#code#>\n \}\n\n var baz2: Int {\n get {\n <#code#>\n \}\n set {\n <#code#>\n \}\n \}\n\n subscript(arg: Int) -> String {\n <#code#>\n \}\n\n subscript(arg1: Int, arg2: Int) -> String {\n get {\n <#code#>\n \}\n set {\n <#code#>\n \}\n \}\n}}
27
27
}
28
28
29
-
classAdopter2{} // expected-note{{candidate has non-matching type '()'}}
29
+
classAdopter2{}
30
30
31
31
extensionAdopter2:Protocol2{ // expected-error{{ype 'Adopter2' does not conform to protocol 'Protocol2'}}
32
32
}
@@ -131,19 +131,19 @@ public class Adopter11: ProtocolWithPrivateAccess3, ProtocolWithPrivateAccess4 {
131
131
protocolProtocolRequiresInit1{
132
132
init(arg:Int) // expected-note{{protocol requires initializer 'init(arg:)' with type '(arg: Int)'; do you want to add a stub?}} {{48-48=\n init(arg: Int) {\n <#code#>\n \}\n}}
133
133
}
134
-
finalclassAdopter12:ProtocolRequiresInit1{} //expected-error {{type 'Adopter12' does not conform to protocol 'ProtocolRequiresInit1'}} // expected-note{{candidate}}
134
+
finalclassAdopter12:ProtocolRequiresInit1{} //expected-error {{type 'Adopter12' does not conform to protocol 'ProtocolRequiresInit1'}}
135
135
136
136
protocolProtocolRequiresInit2{
137
137
init(arg:Int) // expected-note{{protocol requires initializer 'init(arg:)' with type '(arg: Int)'; do you want to add a stub?}} {{46-46=\n convenience init(arg: Int) {\n <#code#>\n \}\n}}
extensionAdopter13:ProtocolRequiresInit2{} //expected-error {{type 'Adopter13' does not conform to protocol 'ProtocolRequiresInit2'}}
141
141
142
142
protocolProtocolRequiresInit3{
143
143
init(arg:Int) // expected-note{{protocol requires initializer 'init(arg:)' with type '(arg: Int)'; do you want to add a stub?}} {{46-46=\n init(arg: Int) {\n <#code#>\n \}\n}}
144
144
}
145
145
146
-
structAdopter14{} // expected-note{{candidate}}
146
+
structAdopter14{}
147
147
extensionAdopter14:ProtocolRequiresInit3{} //expected-error {{type 'Adopter14' does not conform to protocol 'ProtocolRequiresInit3'}}
0 commit comments