cli: map block diagnostics to their source constructs

This commit is contained in:
dev committed 2026-10-07 21:45:57 +03:00
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
module test.source_loop_exit
fn test(src: cap<fs.read>, condition: bool) -> void effects [fs.read] {
let file = fs.open_read(src, b"/input") or trap;
loop { // diagnostic here
if condition {
fs.close(move file) or trap;
break;
} else { break; }
}
trap;
}
fn main(src: cap<fs.read>) -> void effects [fs.read] { test(src, true); }