cli: map block diagnostics to their source constructs
This commit is contained in:
1 parent
1495650587
commit
1a80c42289
30 files changed
+555
-27
No files matched your search
@@ -0,0 +1,15 @@
|
||||
// expect: run
|
||||
// result: 42
|
||||
// grant: src=fs.read:/
|
||||
// vfs: /input=*
|
||||
// phase: 6
|
||||
// spec: docs/spec/15-source-language.md
|
||||
module test.source_close_outcomes
|
||||
|
||||
fn main(src: cap<fs.read>) -> u64 effects [fs.read] {
|
||||
let file = fs.open_read(src, b"/input") or trap;
|
||||
match fs.close(move file) {
|
||||
ok => { 42u64 }
|
||||
err(error) => { 0u64 }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user