; The root iref of island A used with island B traps T0010; iref.eq of the two is false. ; expect: run ; grant: heap=mem.alloc:64 ; trap: T0010 ; phase: 4 ; spec: docs/spec/03-memory-model.md module test.island_foreign_iref 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 -> @a_made, err -> @oom a_made(%a: island): island.create %v, %heap, ok -> @b_made, err -> @oom2 b_made(%b: island): %ga = borrow.ref %a %gb = borrow.ref %b %ra = island.root %ga %rb = island.root %gb %same = iref.eq %ra, %rb cbr %same, @wrong(), @cross() cross: %x = island.borrow %gb, %ra %w = load %x borrow.end %x br @done() wrong: br @done() done: borrow.end %gb borrow.end %ga island.destroy %a island.destroy %b ret %v oom(%e: alloc_error): trap oom2(%e2: alloc_error): trap