tests: extend rejection twins across public semantic features
This commit is contained in:
1 parent
272aebfd32
commit
06d8a1a76a
32 files changed
+396
-22
No files matched your search
@@ -0,0 +1,11 @@
|
||||
// fs.create receives cap<fs.read> instead of required cap<fs.write>; expected/found authority facts agree.
|
||||
// expect: reject E3201
|
||||
// phase: 6
|
||||
// spec: docs/spec/05-effects-and-capabilities.md §10.5
|
||||
// AIR twin: phase2/reject/wrong_capability_kind.air
|
||||
module test.source_wrong_capability_kind
|
||||
fn f(c: cap<fs.read>, p: slice<u8>) -> void effects [fs.write] {
|
||||
let file = fs.create(c, p) or trap; // diagnostic here: fs.create
|
||||
fs.close(move file) or trap;
|
||||
}
|
||||
fn main() -> u64 effects [] { return 0u64; }
|
||||
Reference in new issue
Block a user