; One mutable access per island at a time, even through different irefs. ; expect: reject E2101 ; phase: 4 ; spec: docs/spec/03-memory-model.md module test.island_two_mut air 0 lang 0.1 features [capabilities, effects, heap, islands, ownership, resources] fn @main(%heap: cap) -> u64 effects [mem.alloc] entry: %v = const.u64 1 island.create %v, %heap, ok -> @made, err -> @oom made(%i: island): %g = borrow.mut %i %a = island.root %g island.alloc %g, %v, ok -> @got, err -> @full got(%b: iref): %x = island.borrow %g, %a %y = island.borrow %g, %b borrow.end %y borrow.end %x borrow.end %g island.destroy %i ret %v full(%e2: alloc_error): trap oom(%e: alloc_error): trap