nx_probe_mlneg_live.nx source
↩ module page · 16 lines · 927 B
1// nx_probe_mlneg_live.nx -- MUST-COMPILE-AND-COMPUTE WITNESS (contract changed by LN15, 2026-08-25):
2// a multi-line binary op with leading MINUS now JOINS the expression above it (c == a - b == -1).
3// `-` is a legal unary prefix, so before 2026-08-13 this parsed as a SEPARATE discarded `- b` statement
4// -- the 2026-05-19 nx_force_cross silent-wrong-value shape (c kept only the first term; measured live
5// exit 7, no diagnostic). 2026-08-13 refused it via the discarded-pure-expression check; LN15 made it
6// correct instead. That check still stands and its irreducible witness is nx_probe_lone_operator.nx.
7// EXPECT: BUILDS, runs exit 0 (c == -1, so the `c == 1` branch is NOT taken). If this ever REFUSES,
8// LN15 has regressed; if it exits 7, the first-term-only split is back.
9func main(argc: i64, argv: *u8) -> i64 {
10 let a: i64 = 1
11 let b: i64 = 2
12 let c: i64 = a
13 - b
14 if c == 1 { return 7 }
15 return 0
16}