; channel.send consumes the value on every edge; on closed/cancelled it comes back as a block parameter, so the old value is dead. ; expect: reject E2001 ; phase: 3 ; spec: docs/spec/04-concurrency-and-atomics.md module test.channels_use_after_send air 0 lang 0.1 features [cancellation, capabilities, channels, effects, heap, ownership, resources, tasks] fn @f(%txb: mut>>, %o: own) -> u64 effects [task.wait] entry: channel.send %txb, %o, ok -> @sent, closed -> @back, cancelled -> @back sent: %z = const.u64 0 ret %z back(%r: own): %b = borrow.ref %o borrow.end %b %v = own.take %r ret %v