wcc/check: reject untyped-float + nil into a tagged dst with no matching variant (wwstage align to cstage)

isassignable's untyped-float (A4) and nil (A5) arms over-accepted a source
into a tagged dst where no variant accepts it -> silent over-accept then
tag-0 miscompile; cstage louds. Reject (cerr + c.errs+=1). Part of the
isassignable tagged-dst over-accept class (#23 fixed arm3; A6/A7 deferred
to the B-full nominal arc). test/wcc/836.
This commit is contained in:
2026-06-09 19:07:40 +09:00
parent 7e19d282f4
commit 08ccb734b2
5 changed files with 385 additions and 6 deletions

View File

@@ -260,6 +260,7 @@ TESTS = $(BIN)/test_smoke $(BIN)/test_lex $(BIN)/test_parse $(BIN)/test_check \
$(BIN)/test_tuple_elem_overlong \
$(BIN)/test_tagged_arr_variant \
$(BIN)/test_nested_union_int_box \
$(BIN)/test_tagged_assignable_cluster \
$(BIN)/test_inferred_array_global \
$(BIN)/test_slice_str_global_arg \
$(BIN)/test_slice_str_global_zero \
@@ -737,6 +738,12 @@ $(BIN)/test_nested_union_int_box: test/wcc/835_nested_union_int_box.c $(BIN)/ww
$(LIB)/libwwrt.a | $(BIN)
$(CC) $(CFLAGS) -o $@ $<
$(BIN)/test_tagged_assignable_cluster: test/wcc/836_tagged_assignable_cluster.c $(BIN)/ww \
$(BIN)/w6c $(BIN)/w6a $(BIN)/w6l \
$(BIN)/ww_ww $(BIN)/w6c_ww $(BIN)/w6a_ww $(BIN)/w6l_ww \
$(LIB)/libwwrt.a | $(BIN)
$(CC) $(CFLAGS) -o $@ $<
$(BIN)/test_inferred_array_global: test/wcc/833_inferred_array_global.c $(BIN)/ww \
$(BIN)/w6c $(BIN)/w6a $(BIN)/w6l \
$(BIN)/ww_ww $(BIN)/w6c_ww $(BIN)/w6a_ww $(BIN)/w6l_ww \