code wiki / (root) / _offc_probe_i32lit.nx

_offc_probe_i32lit.nx

buildroot/runtime/_offc_probe_i32lit.nx

2300 B53 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind probetopic offc
docsdependenciesstructsconstsfunctions

about

_offc_probe_i32lit.nx -- ACCEPTANCE PROBE for integer type-context inference. THE DEFECT (routed from the shader-backend lane, 2026-08-24): a bare integer literal types as TY_I64, so `var a: i32 = 0` hands the backend an i64 constant for an i32 binding and cannot lower. They proved it with a ONE-BLOCK control (ir_blocks=1, no branch, no loop), so it is attributable to TYPING and not to control-flow recovery -- and they correctly refused to hack a narrowing into a backend whose own message reads "refused rather than narrowed". THE FIX (staged in nx_parse.nx this lane, NOT yet in the live compiler): the float branch of parse_stmt_let already did exactly this for `let x: f32 = 1.5` -- re-tagging a default-typed literal Value when the binding's declared type demands a narrower one. The integer sibling had never been written. Half a law. HOW TO USE THIS PROBE. It is the before/after harness for that landing: BEFORE the toolchain carries the fix -> this must FAIL TO BUILD (the defect). AFTER the toolchain carries the fix -> this must BUILD and exit 0. A probe that passes on both sides would be proving nothing, so its RED today is the load-bearing half of the evidence. Coverage is every narrowing width and BOTH signednesses, because the fix re-tags with the declared type itself and must therefore preserve the `sext` bit that keeps i32 (sign-extending loads) distinct from u32 (zero-extending) -- a distinction this estate has already paid for once (the x509 0xA0 witness).

dependencies 1 imports · 0 importers

nx_syscalls.nx _offc_probe_i32lit.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_write

structs

none

consts

none

functions

28func main() -> i64
calls 1: sys_write