code wiki / (root) / nx_probe_linecont.nx

nx_probe_linecont.nx source

↩ module page · 22 lines · 747 B

1// nx_probe_linecont.nx -- LN15 INSTRUMENT (not a fixture): does a continuation line 2// opening with a binary operator JOIN the previous statement, or become a dead statement? 3// This is the det2x2 bug class that forced the runtime-wide sweep on 2026-07-09. 4// 5// run-exit 0 => continuation JOINS (the language is correct) 6// run-exit 1 => `- b` became a DEAD STATEMENT and d kept the value of `a` (the defect) 7// run-exit 2 => neither: d is some third value, report it rather than guess 8 9import "nx_syscalls.nx" 10 11func main(argc: i64, argv: **u8) -> i64 { 12 let a: i64 = 7 13 let b: i64 = 3 14 15 // The whole experiment is these two lines. 16 let d: i64 = a 17 - b 18 19 if d == 4 { return 0 } 20 if d == 7 { return 1 } 21 return 2 22}