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
takeGeneric(globalMO) // expected-error {{noncopyable type 'MO' cannot be used with generics yet}}
79
-
takeGeneric(MO()) // expected-error {{noncopyable type 'MO' cannot be used with generics yet}}
80
-
takeGeneric(mo) // expected-error {{noncopyable type 'MO' cannot be used with generics yet}}
78
+
takeGeneric(globalMO) // expected-error {{noncopyable type 'MO' cannot be substituted for copyable generic parameter 'T' in 'takeGeneric'}}
79
+
takeGeneric(MO()) // expected-error {{noncopyable type 'MO' cannot be substituted for copyable generic parameter 'T' in 'takeGeneric'}}
80
+
takeGeneric(mo) // expected-error {{noncopyable type 'MO' cannot be substituted for copyable generic parameter 'T' in 'takeGeneric'}}
81
81
82
82
takeAny(mo) // expected-error {{noncopyable type 'MO' cannot be erased to copyable existential type 'Any'}}
83
83
print(mo) // expected-error {{noncopyable type 'MO' cannot be erased to copyable existential type 'Any'}}
84
-
_ ="\(mo)" // expected-error {{noncopyable type 'MO' cannot be used with generics yet}}
85
-
let _:String=String(describing: mo) // expected-error {{noncopyable type 'MO' cannot be used with generics yet}}
84
+
_ ="\(mo)" // expected-error {{noncopyable type 'MO' cannot be substituted for copyable generic parameter 'T' in 'appendInterpolation'}}
85
+
let _:String=String(describing: mo) // expected-error {{noncopyable type 'MO' cannot be substituted for copyable generic parameter 'Subject' in 'init(describing:)'}}
86
86
87
87
takeGeneric{()->Int?in mo.x }
88
88
genericVarArg(5)
89
-
genericVarArg(mo) // expected-error {{noncopyable type 'MO' cannot be used with generics yet}}
89
+
genericVarArg(mo) // expected-error {{noncopyable type 'MO' cannot be substituted for copyable generic parameter 'T' in 'genericVarArg'}}
90
90
91
91
takeGeneric((mo,5)) // expected-error {{noncopyable type 'MO' cannot be used with generics yet}}
92
92
takeGenericSendable((mo, mo)) // expected-error 2{{noncopyable type 'MO' cannot be used with generics yet}}
93
93
94
94
letsingleton:(MO)=(mo)
95
-
takeGeneric(singleton) // expected-error {{noncopyable type 'MO' cannot be used with generics yet}}
95
+
takeGeneric(singleton) // expected-error {{noncopyable type 'MO' cannot be substituted for copyable generic parameter 'T' in 'takeGeneric'}}
96
96
97
97
takeAny((mo)) // expected-error {{noncopyable type 'MO' cannot be erased to copyable existential type 'Any'}}
98
98
takeAny((mo, mo)) // expected-error {{noncopyable type '(MO, MO)' cannot be erased to copyable existential type 'Any'}}
let _:[String:MO]= // expected-error {{noncopyable type 'MO' cannot be used with generic type 'Dictionary<Key, Value>' yet}}
234
238
["hello":MO()] // expected-error{{tuples with noncopyable elements are not supported}}
235
239
236
-
// i think this one's only caught b/c of the 'Any' change
237
-
_ =[MO()] // expected-error {{noncopyable type 'MO' cannot be used with generics yet}}
240
+
_ =[MO()] // expected-error {{noncopyable type 'MO' cannot be substituted for copyable generic parameter 'Element' in 'Array'}}
238
241
239
242
let _:Array<MO>=.init() // expected-error {{noncopyable type 'MO' cannot be used with generic type 'Array<Element>' yet}}
240
243
_ =[MO]() // expected-error {{noncopyable type 'MO' cannot be used with generic type 'Array<Element>' yet}}
241
244
242
-
lets:String="hello \(mo)" // expected-error {{noncopyable type 'MO' cannot be used with generics yet}}
245
+
lets:String="hello \(mo)" // expected-error {{noncopyable type 'MO' cannot be substituted for copyable generic parameter 'T' in 'appendInterpolation'}}
@@ -272,13 +275,18 @@ struct GenerousGuy: Gives { // expected-error {{type 'GenerousGuy' does not conf
272
275
func give()->Ty{}
273
276
}
274
277
275
-
func doBadMetatypeStuff<T>(_ t:T){
278
+
func doBadMetatypeStuff<T>(_ t:T){ // expected-note@:25 {{generic parameter 'T' has an implicit Copyable requirement}}
276
279
lety= t as!Any.Type
277
280
iflet MO_MetaType = y as?MO.Type{ // expected-warning {{cast from 'any Any.Type' to unrelated type 'MO.Type' always fails}}
278
281
letx=MO_MetaType.init()
279
282
let _ = x
280
283
}
281
284
}
282
285
func tryToDoBadMetatypeStuff(){
283
-
doBadMetatypeStuff(MO.self) // expected-error {{noncopyable type 'MO.Type' cannot be used with generics yet}}
286
+
doBadMetatypeStuff(MO.self) // expected-error {{metatype 'MO.Type' of noncopyable type 'MO' cannot be substituted for copyable generic parameter 'T' in 'doBadMetatypeStuff'}}
287
+
}
288
+
289
+
func packingHeat<eachT>(_ t:repeateachT){}
290
+
func packIt(){
291
+
packingHeat(MO()) // expected-error {{noncopyable type 'MO' cannot be used with generics yet}}
let _:Sendable= fd // expected-error {{noncopyable type 'FileDescriptor' cannot be erased to copyable existential type 'any Sendable'}}
102
102
103
103
takeAnySendable(fd) // expected-error {{noncopyable type 'FileDescriptor' cannot be erased to copyable existential type 'any Sendable'}}
104
-
takeSomeSendable(fd) // expected-error {{noncopyable type 'FileDescriptor' cannot be used with generics yet}}
104
+
takeSomeSendable(fd) // expected-error {{noncopyable type 'FileDescriptor' cannot be substituted for copyable generic parameter 'some Sendable' in 'takeSomeSendable'}}
105
105
106
106
let _ = fd asSendable // expected-error {{noncopyable type 'FileDescriptor' cannot be erased to copyable existential type 'any Sendable'}}
107
107
@@ -159,7 +159,8 @@ extension Sendable {
159
159
}
160
160
161
161
func tryToDupe(_ fd:borrowingFileDescriptor){
162
-
fd.doIllegalThings() // expected-error {{noncopyable type 'FileDescriptor' cannot be used with generics yet}}
162
+
// FIXME: this should describe 'Self' as 'any Sendable' or something.
163
+
fd.doIllegalThings() // expected-error {{noncopyable type 'FileDescriptor' cannot be substituted for copyable generic parameter 'Self' in 'Sendable'}}
0 commit comments