#133 indexed-scalar compound-assign. The 21 rows split by observability: 18 value rows -> test/lang/idx_compound_test.ww (one @test fn each, primitive-only asserts, slot-poison + neighbor-unchanged read-back); 3 reject rows -> test/wcc/data/idx_compound_{float_indexed,str_indexed, chained_ptr_float}/case.ww as //ww:error, asserting BOTH stages reject on the shared diagnostic body (cstage's leading prefix excluded). The C twin is retired; its coverage is a strict superset of the original rows. First reject-bearing fold-3 migration -- validates the runww dual-stage home end to end. LANGBYTEID_EXPECTED_MIN 49 -> 50.
14 lines
590 B
Plaintext
14 lines
590 B
Plaintext
//ww:error "indexed-lvalue compound on str element not wired (#133/rule-7)"
|
|
// Lifted from test/wcc/948_idx_compound_run.c reject row "he_str_indexed"
|
|
// (#133-expanded rule-7): a compound assign on an indexed STR element is
|
|
// unwired in both stages and MUST loud-fail. The substring is the FULL shared
|
|
// diagnostic body — byte-identical on both stages — pinned to "str element" so
|
|
// it cannot also match the float row (no file:line / "ww: " prefix, which
|
|
// differ cs vs ww).
|
|
package main;
|
|
export fn main() i32 = {
|
|
let a: [4]str = ["a", "b", "c", "d"];
|
|
a[0] += "x";
|
|
return 0;
|
|
};
|