; In a module declaring cancellation, task.join requires the effect task.wait. ; expect: reject E3101 ; phase: 3 ; spec: docs/spec/04-concurrency-and-atomics.md module test.cancel_join_needs_wait air 0 lang 0.1 features [cancellation, effects, ownership, tasks] fn @main() -> u8 effects [task.spawn] entry: %sc = task.scope.begin %t = task.spawn %sc, @w() %r = task.join %t task.scope.end %sc ret %r fn @w() -> u8 effects [] entry: %z = const.u8 0 ret %z