tests: inventory and verify source rejection twins
This commit is contained in:
1 parent
09fbf8a5bc
commit
e4aacef48c
28 files changed
+1092
-8
No files matched your search
@@ -0,0 +1,13 @@
|
||||
// expect: reject E2002
|
||||
// phase: 6
|
||||
// spec: docs/spec/03-memory-model.md §24
|
||||
// AIR twin: phase4/reject/arc_release_twice.air
|
||||
module test.twins.arc_release_twice
|
||||
|
||||
fn main(heap: cap<mem.alloc>) -> void effects [mem.alloc] {
|
||||
let i = island.create(1u64, heap) or trap;
|
||||
let f = island.freeze(move i);
|
||||
let a = arc.from_frozen(move f);
|
||||
arc.release(move a);
|
||||
arc.release(move a); // diagnostic here: arc.release
|
||||
}
|
||||
Reference in new issue
Block a user