tests: extend audited rejection twins through tasks and locks
This commit is contained in:
1 parent
e4aacef48c
commit
272aebfd32
16 files changed
+157
-13
No files matched your search
@@ -3,9 +3,10 @@
|
||||
// phase: 6
|
||||
// spec: docs/spec/15-source-language.md
|
||||
module demo.resourceleak
|
||||
// AIR twin: phase2/reject/resource_leak.air
|
||||
|
||||
fn main(src: cap<fs.read>) -> void
|
||||
effects [fs.read]
|
||||
{
|
||||
{ // diagnostic here
|
||||
let f = fs.open_read(src, b"/in/a") or trap;
|
||||
}
|
||||
@@ -3,11 +3,12 @@
|
||||
// phase: 6
|
||||
// spec: docs/spec/13-contracts-and-unsafe.md
|
||||
module demo.unsafeboundary
|
||||
// AIR twin: phase2/reject/unsafe_outside_boundary.air
|
||||
|
||||
fn get(s: slice<u64>, i: usize) -> u64
|
||||
effects []
|
||||
{
|
||||
ref unchecked e = s[i];
|
||||
ref unchecked e = s[i]; // diagnostic here
|
||||
*e
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user