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
Copy file name to clipboardExpand all lines: test/decl/protocol/conforms/error_self_conformance.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ func testSimple(error: Error) {
9
9
}
10
10
11
11
protocolErrorRefinement:Error{}
12
-
functestErrorRefinment(error:ErrorRefinement){
12
+
functestErrorRefinement(error:ErrorRefinement){
13
13
opensError(error) // okay
14
14
wantsError(error, error) // expected-error {{type 'any ErrorRefinement' cannot conform to 'Error'}} expected-note {{only concrete types such as structs, enums and classes can conform to protocols}}
// Qualified type lookup should always be unambiguous.
19
19
publicfunc qualifiedFoo(_ key:SynthesizedClass.CodingKeys){} // expected-error {{method cannot be declared public because its parameter uses a private type}}
20
20
internalfunc qualifiedBar(_ key:SynthesizedClass.CodingKeys){} // expected-error {{method cannot be declared internal because its parameter uses a private type}}
21
-
fileprivatefuncqualfiedBaz(_ key:SynthesizedClass.CodingKeys){} // expected-error {{method cannot be declared fileprivate because its parameter uses a private type}}
21
+
fileprivatefuncqualifiedBaz(_ key:SynthesizedClass.CodingKeys){} // expected-error {{method cannot be declared fileprivate because its parameter uses a private type}}
publicfunc qualifiedFoo(_ key:SynthesizedClass.CodingKeys){} // expected-error {{method cannot be declared public because its parameter uses a private type}}
99
99
internalfunc qualifiedBar(_ key:SynthesizedClass.CodingKeys){} // expected-error {{method cannot be declared internal because its parameter uses a private type}}
100
-
fileprivatefuncqualfiedBaz(_ key:SynthesizedClass.CodingKeys){} // expected-error {{method cannot be declared fileprivate because its parameter uses a private type}}
100
+
fileprivatefuncqualifiedBaz(_ key:SynthesizedClass.CodingKeys){} // expected-error {{method cannot be declared fileprivate because its parameter uses a private type}}
publicfunc qualifiedFoo(_ key:NonSynthesizedClass.CodingKeys){} // expected-error {{'CodingKeys' is not a member type of struct 'class_codable_member_type_lookup.NonSynthesizedClass'}}
188
188
internalfunc qualifiedBar(_ key:NonSynthesizedClass.CodingKeys){} // expected-error {{'CodingKeys' is not a member type of struct 'class_codable_member_type_lookup.NonSynthesizedClass'}}
189
-
fileprivatefuncqualfiedBaz(_ key:NonSynthesizedClass.CodingKeys){} // expected-error {{'CodingKeys' is not a member type of struct 'class_codable_member_type_lookup.NonSynthesizedClass'}}
189
+
fileprivatefuncqualifiedBaz(_ key:NonSynthesizedClass.CodingKeys){} // expected-error {{'CodingKeys' is not a member type of struct 'class_codable_member_type_lookup.NonSynthesizedClass'}}
190
190
privatefunc qualifiedQux(_ key:NonSynthesizedClass.CodingKeys){} // expected-error {{'CodingKeys' is not a member type of struct 'class_codable_member_type_lookup.NonSynthesizedClass'}}
191
191
192
192
// Unqualified lookups should find the public top-level CodingKeys type.
// Qualified type lookup should always be unambiguous.
19
19
publicfunc qualifiedFoo(_ key:SynthesizedStruct.CodingKeys){} // expected-error {{method cannot be declared public because its parameter uses a private type}}
20
20
internalfunc qualifiedBar(_ key:SynthesizedStruct.CodingKeys){} // expected-error {{method cannot be declared internal because its parameter uses a private type}}
21
-
fileprivatefuncqualfiedBaz(_ key:SynthesizedStruct.CodingKeys){} // expected-error {{method cannot be declared fileprivate because its parameter uses a private type}}
21
+
fileprivatefuncqualifiedBaz(_ key:SynthesizedStruct.CodingKeys){} // expected-error {{method cannot be declared fileprivate because its parameter uses a private type}}
publicfunc qualifiedFoo(_ key:SynthesizedStruct.CodingKeys){} // expected-error {{method cannot be declared public because its parameter uses a private type}}
99
99
internalfunc qualifiedBar(_ key:SynthesizedStruct.CodingKeys){} // expected-error {{method cannot be declared internal because its parameter uses a private type}}
100
-
fileprivatefuncqualfiedBaz(_ key:SynthesizedStruct.CodingKeys){} // expected-error {{method cannot be declared fileprivate because its parameter uses a private type}}
100
+
fileprivatefuncqualifiedBaz(_ key:SynthesizedStruct.CodingKeys){} // expected-error {{method cannot be declared fileprivate because its parameter uses a private type}}
publicfunc qualifiedFoo(_ key:NonSynthesizedStruct.CodingKeys){} // expected-error {{'CodingKeys' is not a member type of struct 'struct_codable_member_type_lookup.NonSynthesizedStruct'}}
188
188
internalfunc qualifiedBar(_ key:NonSynthesizedStruct.CodingKeys){} // expected-error {{'CodingKeys' is not a member type of struct 'struct_codable_member_type_lookup.NonSynthesizedStruct'}}
189
-
fileprivatefuncqualfiedBaz(_ key:NonSynthesizedStruct.CodingKeys){} // expected-error {{'CodingKeys' is not a member type of struct 'struct_codable_member_type_lookup.NonSynthesizedStruct'}}
189
+
fileprivatefuncqualifiedBaz(_ key:NonSynthesizedStruct.CodingKeys){} // expected-error {{'CodingKeys' is not a member type of struct 'struct_codable_member_type_lookup.NonSynthesizedStruct'}}
190
190
privatefunc qualifiedQux(_ key:NonSynthesizedStruct.CodingKeys){} // expected-error {{'CodingKeys' is not a member type of struct 'struct_codable_member_type_lookup.NonSynthesizedStruct'}}
191
191
192
192
// Unqualified lookups should find the public top-level CodingKeys type.
0 commit comments