test(ir): lock call lowering with .ir snapshots + classification tests (A3.2 convergence step 1)
Test-first scaffolding before the CallPlan convergence — no call-code change. Locks current call behavior so the later lowerCall rewrite is guarded. - .ir snapshots for representative call forms: 0031 (direct local-fn + dot-shorthand enum ctor), 0032 (UFCS/struct method), 0301 (closure/ fn-pointer slot), 0400 (protocol dispatch + static-through-impl). - New focused example 0044-basic-default-arg-expansion + .ir snapshot, pinning call-site default expansion (scale(5)->scale(ctx,5,2), label(1)->label(ctx,1,"v","!")). Foreign-class instance+static is already pinned by the existing FFI .ir set. - Broaden calls.test.zig (scope-free classification): remaining reflection builtins, sqrt->f64, cast->resolved type arg, enum_literal->target_type. 1033 (#caller_location) was rejected as a snapshot: it embeds the absolute source path as a length-typed string that normalize_ir can't reconcile; default-arg coverage uses the path-free 0044 instead. Gate green: zig build, zig build test, tests/run_examples.sh -> 357/0.
This commit is contained in:
4175
examples/expected/0031-basic-local-fn-return.ir
Normal file
4175
examples/expected/0031-basic-local-fn-return.ir
Normal file
File diff suppressed because it is too large
Load Diff
3797
examples/expected/0032-basic-ufcs-return-type.ir
Normal file
3797
examples/expected/0032-basic-ufcs-return-type.ir
Normal file
File diff suppressed because it is too large
Load Diff
1
examples/expected/0044-basic-default-arg-expansion.exit
Normal file
1
examples/expected/0044-basic-default-arg-expansion.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
3399
examples/expected/0044-basic-default-arg-expansion.ir
Normal file
3399
examples/expected/0044-basic-default-arg-expansion.ir
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
default: 10
|
||||
explicit: 15
|
||||
v1!
|
||||
x2!
|
||||
y3?
|
||||
3314
examples/expected/0301-closures-fn-pointers.ir
Normal file
3314
examples/expected/0301-closures-fn-pointers.ir
Normal file
File diff suppressed because it is too large
Load Diff
3415
examples/expected/0400-protocols-impl-for-builtin.ir
Normal file
3415
examples/expected/0400-protocols-impl-for-builtin.ir
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user