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,14 @@
|
||||
// expect: reject E3002
|
||||
// phase: 6
|
||||
// spec: docs/spec/06-resources-and-errors.md
|
||||
module test.source_integer_match_join
|
||||
|
||||
fn test(src: cap<fs.read>, condition: u64) -> void effects [fs.read] {
|
||||
let file = fs.open_read(src, b"/input") or trap;
|
||||
match condition { // diagnostic here
|
||||
0 => { fs.close(move file) or trap; }
|
||||
_ => {}
|
||||
}
|
||||
trap;
|
||||
}
|
||||
fn main(src: cap<fs.read>) -> void effects [fs.read] { test(src, 0u64); }
|
||||
Reference in new issue
Block a user