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,16 @@
|
||||
// expect: reject E3002
|
||||
// phase: 6
|
||||
// spec: docs/spec/06-resources-and-errors.md
|
||||
// AIR twin: phase2/reject/resource_join_mismatch.air
|
||||
module test.source_resource_join_mismatch
|
||||
|
||||
fn close_on_one_path(src: cap<fs.read>, close_it: bool) -> void effects [fs.read] {
|
||||
let file = fs.open_read(src, b"/input") or trap;
|
||||
if close_it { // diagnostic here
|
||||
fs.close(move file) or trap;
|
||||
}
|
||||
trap;
|
||||
}
|
||||
fn main(src: cap<fs.read>) -> void effects [fs.read] {
|
||||
close_on_one_path(src, true);
|
||||
}
|
||||
Reference in new issue
Block a user