wcc: drop @test fns from non-T builds, both stages (harec check.c:3941)
Splice @test N_FNDECLs out of the unit after the body-check passes, mirroring harec's checked-but-not-emitted: a broken @test body still errors loudly in non-T; @test-free units are emission-unchanged. 910/997 table rows pin keep/test x non-T/-T, head+consecutive unlink, undef-body reject, and plain-calls-dropped loud link-fail. w6c+wwdump combined.ww regen. (#6-team)
This commit is contained in:
17
test/wcc/data/attest_undefbody.ww
Normal file
17
test/wcc/data/attest_undefbody.ww
Normal file
@@ -0,0 +1,17 @@
|
||||
// #6 fixture: a @test body is type-checked in a non-test build even
|
||||
// though the fn is then spliced out. harec checks the body
|
||||
// (ref/harec/src/check.c:3913) BEFORE the append_decl skip (:3941), so
|
||||
// the splice is check-THEN-drop, never drop-then-skip-check. Pins that
|
||||
// placement decision: an undefined symbol in the @test body must be
|
||||
// caught LOUDLY in non-T (a pre-pass splice would silence it). Compiled
|
||||
// WITHOUT -T (910/997 plain-reject row).
|
||||
|
||||
package data;
|
||||
|
||||
fn keep() i32 = {
|
||||
return 1;
|
||||
};
|
||||
|
||||
@test fn undefbody_test() void = {
|
||||
undefined_symbol_xyz();
|
||||
};
|
||||
Reference in New Issue
Block a user