nx_probe_mlop_live.nx source
↩ module page · 17 lines · 1002 B
1// nx_probe_mlop_live.nx -- MUST-COMPILE-AND-COMPUTE WITNESS (contract changed by LN15, 2026-08-25):
2// a multi-line binary op with the operator LEADING the next line now JOINS the expression above it.
3// Historically this silently parsed as TWO statements (c = a; then bare + b) -- a silent-wrong-value
4// trap banked in the memory corpus -- and from 2026-08-13 the parse_primary denylist refused it
5// LOUDLY. LN15 (tok_line_continuation, nx_lex_kinds.nx) made it CORRECT instead: no statement form
6// begins with +, so at statement level it can only ever have been a continuation.
7// EXPECT: BUILDS, runs exit 0 (c == 3). nx_linecont_gate asserts the value; nx_langdiag_gate keeps
8// this as an acceptance control. If this ever REFUSES, LN15 has regressed; if it builds and exits 7,
9// the pre-LN15 two-statement split is back and that is the worse of the two.
10func main(argc: i64, argv: *u8) -> i64 {
11 let a: i64 = 1
12 let b: i64 = 2
13 let c: i64 = a
14 + b
15 if c != 3 { return 7 }
16 return 0
17}