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/Generics/conditional_conformances_literals.swift
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ func arraySameType() {
45
45
46
46
let _:SameType= arrayWorks asSameType
47
47
let _:SameType= arrayFails asSameType
48
-
// expected-error@-1 {{protocol 'SameType' requires the types 'Fails' and 'Works' be equivalent}}
48
+
// expected-error@-1 {{generic struct 'Array' requires the types 'Fails' and 'Works' be equivalent}}
49
49
}
50
50
51
51
func dictionarySameType(){
@@ -70,7 +70,7 @@ func dictionarySameType() {
70
70
71
71
let _:SameType= dictWorks asSameType
72
72
let _:SameType= dictFails asSameType
73
-
// expected-error@-1 {{protocol 'SameType' requires the types 'Fails' and 'Works' be equivalent}}
73
+
// expected-error@-1 {{generic struct 'Dictionary' requires the types 'Fails' and 'Works' be equivalent}}
74
74
}
75
75
76
76
func arrayConforms(){
@@ -91,11 +91,11 @@ func arrayConforms() {
91
91
92
92
let _:Conforms=[works]asConforms
93
93
let _:Conforms=[fails]asConforms
94
-
// expected-error@-1 {{protocol 'Conforms' requires that 'Fails' conform to 'Conforms'}}
94
+
// expected-error@-1 {{generic struct 'Array' requires that 'Fails' conform to 'Conforms'}}
95
95
96
96
let _:Conforms= arrayWorks asConforms
97
97
let _:Conforms= arrayFails asConforms
98
-
// expected-error@-1 {{protocol 'Conforms' requires that 'Fails' conform to 'Conforms'}}
98
+
// expected-error@-1 {{generic struct 'Array' requires that 'Fails' conform to 'Conforms'}}
99
99
}
100
100
101
101
func dictionaryConforms(){
@@ -116,11 +116,11 @@ func dictionaryConforms() {
116
116
117
117
let _:Conforms=[0: works]asConforms
118
118
let _:Conforms=[0: fails]asConforms
119
-
// expected-error@-1 {{protocol 'Conforms' requires that 'Fails' conform to 'Conforms'}}
119
+
// expected-error@-1 {{generic struct 'Dictionary' requires that 'Fails' conform to 'Conforms'}}
120
120
121
121
let _:Conforms= dictWorks asConforms
122
122
let _:Conforms= dictFails asConforms
123
-
// expected-error@-1 {{protocol 'Conforms' requires that 'Fails' conform to 'Conforms'}}
123
+
// expected-error@-1 {{generic struct 'Dictionary' requires that 'Fails' conform to 'Conforms'}}
124
124
}
125
125
126
126
func combined(){
@@ -133,6 +133,6 @@ func combined() {
133
133
// expected-error@-1 {{type 'any Conforms' cannot conform to 'Conforms'}} expected-note@-1 {{only concrete types such as structs, enums and classes can conform to protocols}}
134
134
135
135
let _:Conforms=[[0:[1:[fails]]asConforms]]
136
-
// expected-error@-1 {{protocol 'Conforms' requires that 'Fails' conform to 'Conforms'}}
136
+
// expected-error@-1 {{generic struct 'Dictionary' requires that 'Fails' conform to 'Conforms'}}
137
137
// expected-error@-2 {{type 'any Conforms' cannot conform to 'Conforms'}} expected-note@-2 {{only concrete types such as structs, enums and classes can conform to protocols}}
0 commit comments