Skip to content

copy_propagate drops typed-alias widening (u8 math where spec wrote u16); zig primitive-name shadows; unused tuple elements in tests #1936

Description

@gHashTag

Batch five from the tri-net exec campaign:

  1. copy_propagate ignores the declared type: let lo: u16 = byte_param; propagated the bare u8 identifier into every use, silently narrowing the arithmetic (s_lo + (s_hi << 8) in u8: shift RHS overflows u3 and the add wraps). The annotation IS the widening idiom -- typed aliases must stay materialized. Found via video_bridge frag_seq/fb_util_pct.
  2. Identifiers shadowing Zig primitive names: sha-round locals f16/f32/f64 -- Zig rejects the bare names. Emit @"name" at every value-identifier site.
  3. Tuple-destructure elements never read in a test block emit named const bindings -- "unused local constant" (hello). Bind unused elements as _.
  4. Dead-local text pass did not recognize @"name" declarations.

tri-net corpus: tri_sha256, hello pass zig test end-to-end (video_bridge and multipath_routing need tri-net-side spec fixes, done separately).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions