nx_probe_linemap_live.nx source
↩ module page · 17 lines · 773 B
1// nx_probe_linemap_live.nx -- WITNESS for the per-file line map (nx_linemap.nx).
2//
3// The witness works by making the two answers impossible to confuse. This file imports
4// nx_syscalls.nx (~46 KB, ~1200 lines), so the undefined call below sits at a SMALL line
5// in THIS file and a LARGE line in the flattened expanded buffer:
6//
7// BEFORE (no map): error at line ~1200: I do not know the name ...
8// AFTER (map on): error at nx_probe_linemap_live.nx:<small>: I do not know the name ...
9//
10// Three orders of magnitude apart, and the AFTER names the file. No judgement call.
11//
12// expect_exit: nonzero -- this file is SUPPOSED to fail to compile.
13import "nx_syscalls.nx"
14
15func main() -> i64 {
16 let x: i64 = nx_linemap_witness_undefined_86011501(1)
17 return x
18}