frontend: validate unknown effect names before body lowering
This commit is contained in:
1 parent
4c9c5626c9
commit
762c5abe7b
40 files changed
+335
-9
No files matched your search
@@ -0,0 +1,10 @@
|
||||
// expect: run
|
||||
// result: 42
|
||||
// grant: heap=mem.alloc:8
|
||||
// phase: 6
|
||||
// spec: docs/spec/15-source-language.md §8, §9
|
||||
module test.effects.allocation
|
||||
fn main(heap: cap<mem.alloc>) -> u64 effects [mem.alloc] {
|
||||
let value = own.new(42u64, heap) or trap;
|
||||
return own.take(move value);
|
||||
}
|
||||
Reference in new issue
Block a user