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
func applyAnnotatedTransfer(ne:NE, transfer:(NE)->dependsOn(0) NE)->NE{ // expected-error{{lifetime dependencies on function types are not supported}}
20
+
transfer(ne)
21
+
}
22
+
23
+
func applyTransfer(ne:NE, transfer:(NE)->NE)->NE{
24
+
transfer(ne)
25
+
}
26
+
27
+
func testTransfer(nc:consumingNC){
28
+
lettransferred=applyTransfer(ne: nc.ne, transfer: transfer) // expected-error{{cannot convert value of type '(NE) -> _inherit(0) NE' to expected argument type '(NE) -> NE'}}
letborrowed=applyBorrow(nc: nc, borrow: borrow) // expected-error{{cannot convert value of type '(borrowing NC) -> _scope(0) NE' to expected argument type '(borrowing NC) -> NE}}
0 commit comments