code wiki / (root) / _nx_argtype_live_probe.nx

_nx_argtype_live_probe.nx source

↩ module page · 13 lines · 653 B

1// Live proof that ARGUMENT TYPE CHECKING is active in the shipped toolchain. 2// This is the exact shape of the sev-8 ev_num_after silent-zero (debt 1785518763): 3// an out-pointer handed to an integer parameter, where it became a loop bound and the 4// loop never executed -- an evidence organ then reported a ZERO tally for every gate. 5// EXPECTED: BUILD-FAILED with `arg 4 is a POINTER but the parameter is an INTEGER`. 6func num_after(buf: *u8, n: i64, key: *u8, kl: i64) -> i64 { 7 return n - kl 8} 9func mkp(n: i64) -> *i64 { return 4096 as *i64 } 10func main() -> i64 { 11 let ep: *i64 = mkp(16) 12 return num_after("x" as *u8, 4, "y" as *u8, ep) 13}