code wiki / _hdl_build / nx_probe_ptrint_live.nx
nx_probe_ptrint_live.nx source
↩ module page · 14 lines · 638 B
1// nx_probe_ptrint_live.nx -- LIVE WITNESS for the ENFORCED param-type direction (2026-08-05):
2// a value typed *u8 passed into an i64 parameter must BUILD-FAIL with `argument type mismatch`.
3// REPRO: change pi_int(n) below to pi_int(b) and /api/build this target -> refusal expected.
4// Kept VALID in-tree (compiler-root probe convention); the witness is the edit+build cycle.
5// license_tier: ORIGINAL expect_exit: 0
6import "nx_syscalls.nx"
7func pi_int(k: i64) -> i64 { return k + 1 }
8func main(argc: i64, argv: *i64) -> i64 {
9 let b: *u8 = sys_mmap(64)
10 let n: i64 = 7
11 let x: i64 = pi_int(n)
12 sys_exit(0)
13 return 0
14}