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/Constraints/opened_existentials.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -164,7 +164,7 @@ func testReturningOpaqueTypes(p: any P) {
164
164
letq= p.getQ()
165
165
let _:Int= q // expected-error{{cannot convert value of type 'Q' to specified type 'Int'}}
166
166
167
-
p.getCollectionOf() // expected-error{{member 'getCollectionOf' cannot be used on value of protocol type 'P'; use a generic constraint instead}}
167
+
p.getCollectionOf() // expected-error{{member 'getCollectionOf' cannot be used on value of protocol type 'P'; consider using a generic constraint instead}}
168
168
169
169
letq2=getPQ(p)
170
170
let _:Int= q2 // expected-error{{cannot convert value of type 'Q' to specified type 'Int'}}
let _:(Bool)->Clonable?=id(vv.returnSelfIUOStatic as(Bool)->Clonable?)
371
371
let _:Clonable!=id(vv.returnSelfIUOStatic(true))
372
372
373
-
let _ = v.badClonerFn() // expected-error {{member 'badClonerFn' cannot be used on value of protocol type 'Clonable'; use a generic constraint instead}}
374
-
let _ = v.veryBadClonerFn() // expected-error {{member 'veryBadClonerFn' cannot be used on value of protocol type 'Clonable'; use a generic constraint instead}}
373
+
let _ = v.badClonerFn() // expected-error {{member 'badClonerFn' cannot be used on value of protocol type 'Clonable'; consider using a generic constraint instead}}
374
+
let _ = v.veryBadClonerFn() // expected-error {{member 'veryBadClonerFn' cannot be used on value of protocol type 'Clonable'; consider using a generic constraint instead}}
0 commit comments