code wiki / (root) / nx_fn_ptr_typed_test.nx

nx_fn_ptr_typed_test.nx

buildroot/runtime/nx_fn_ptr_typed_test.nx

2513 B70 linesdepth 6pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic fn
docsdependenciesstructsconstsfunctions

about

nx_fn_ptr_typed_test.nx -- exercise TY_FN signature + arity check. Per cardinal feedback-four-pillar-prevent-no-null-passthrough: the compiler must REJECT wrong-arity calls at parse time, not produce a runtime crash.

dependencies 1 imports · 0 importers

nx_kernel_v2.nx nx_fn_ptr_typed_test.nx

imports: nx_kernel_v2.nx

imported by: nobody (leaf or entry point)

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

main t1_correct_arity_2 t2_correct_arity_3 t3_correct_arity_1 t4_zero_arity

structs

none

consts

none

functions

9func add(a: nx_int, b: nx_int) -> nx_int { return a + b }
10func triple(a: nx_int, b: nx_int, c: nx_int) -> nx_int { return a + b + c }
11func ret_self(x: nx_int) -> nx_int { return x }
12func const_42() -> nx_int { return 42 }
15func t1_correct_arity_2() -> nx_int
called by 1: main
23func t2_correct_arity_3() -> nx_int
called by 1: main
31func t3_correct_arity_1() -> nx_int
called by 1: main
39func t4_zero_arity() -> nx_int
called by 1: main
46func main() -> nx_exit