949_dotfield_compound + 949_idxfield_compound are one bug class (#133-lineage compound-assign load-op-store on field lvalues; #34/#33, #263 carve-out) sharing the combine + hard-error path, so the two C carriers fuse into one commit: 26 value rows -> test/lang @test row-tables (primitive-only asserts), 8 reject rows -> runww //ww:error dual-stage carriers. byteid floor 50->52.
16 lines
639 B
Plaintext
16 lines
639 B
Plaintext
//ww:error "single-dot field compound on slice field"
|
|
// Lifted from test/wcc/949_dotfield_compound_run.c reject row "dotfld_he_slice"
|
|
// (#34/rule-7): a compound assign on a single-dot SLICE field is unwired in
|
|
// both stages and MUST loud-fail. The substring is the shared diagnostic body
|
|
// — byte-identical on both stages, pinned to "slice field" so it cannot also
|
|
// match the float/str/tagged rows (no file:line, no cstage "ww: " prefix —
|
|
// both differ cs vs ww).
|
|
package main;
|
|
type S = struct { f: []u8, g: int };
|
|
export fn main() i32 = {
|
|
let b: [2]u8 = [1u8, 2u8];
|
|
let s: S = S{f=b[0:2], g=0};
|
|
s.f += b[0:1];
|
|
return 0;
|
|
};
|