wcc/ww: scopelookuptype prefers the current module's symbol

A type lookup in a bundled build resolved to the newest-installed
same-leaf symbol from ANY module; prefer the current module first
(mirror cstage sym.c:131; the prior attempt's failure was its own
u64-vs-i32 guard bug, not a deeper layer — probe-proven). Also adds
the rule-7 #58 notes at the latent varianterr/scruttype pair and
rewrites the stale deferral block to closing cites. Report item [5].
This commit is contained in:
2026-06-13 02:58:09 +09:00
parent ffe37deaee
commit 63e837e820
6 changed files with 331 additions and 45 deletions

View File

@@ -259,6 +259,7 @@ TESTS = $(BIN)/test_smoke $(BIN)/test_lex $(BIN)/test_parse $(BIN)/test_check \
$(BIN)/test_allocalias_run \
$(BIN)/test_defdim_field_run \
$(BIN)/test_defdim_argslice_run \
$(BIN)/test_slttypepref_run \
$(BIN)/test_gunsigned_run \
$(BIN)/test_taggedidx_run \
$(BIN)/test_fnptrcollide_run \
@@ -781,6 +782,16 @@ $(BIN)/test_defdim_argslice_run: test/wcc/989_defdim_argslice_run.c \
$(LIB)/libwwrt.a | $(BIN)
$(CC) $(CFLAGS) -o $@ $<
# 989_slttypepref_run (#58/#50, c1): scopelookuptype prefers the current
# module's SK_TYPE when a value binding shadows a type leaf two modules both
# export. Builds+runs on BOTH driver twins (rule-10). See the test header.
$(BIN)/test_slttypepref_run: test/wcc/989_slttypepref_run.c \
$(BIN)/ww $(BIN)/ww_ww \
$(BIN)/w6c $(BIN)/w6a $(BIN)/w6l \
$(BIN)/w6c_ww $(BIN)/w6a_ww $(BIN)/w6l_ww \
$(LIB)/libwwrt.a | $(BIN)
$(CC) $(CFLAGS) -o $@ $<
# 989_gunsigned_run (F7-c5, #25): a module-global unsigned ident on the
# divide/shift/relational path must pick the unsigned opcode. Builds+runs on
# BOTH driver twins (rule-10). CLASS-M — see the test header.