Add a diagnostic fixture for a clamp width larger than its range · Issue #1150 · 8f4e/8f4e · GitHub
Skip to content

Add a diagnostic fixture for a clamp width larger than its range #1150

Open

Description

@irimias57

clampAddress must reject an access width larger than the tracked memory range.

Add packages/compiler/tests/errors/instructions/clamp-address/range-too-small.error.8f4e.

Useful reference: packages/compiler/packages/sub-program/packages/stack-analyzer/src/instruction-tests/clampAddress.test.ts includes the equivalent stage-level error case.

Acceptance criteria:

  • Push the address of a one-byte declaration and request a clamp access width of 4.
  • Capture ADDRESS_RANGE_TOO_SMALL, error code 50.
  • Commit the generated diagnostic snapshot.
  • Keep the fixture focused on this single error.
  • No compiler implementation changes are expected.
  • Run npx nx run @8f4e/compiler:test --update.

Activity

  1. added
    help wantedExtra attention is needed
    compilerCompiler, tokenizer, codegen, and language-semantics work
    easySmall, clearly scoped changes with a straightforward approach.
    on Oct 20, 2026
  2. codewithzubair07 commented on Oct 20, 2026

    @codewithzubair07

    @irimias57 Hi! I'd like to take this one. It's my first contribution to 8f4e. I'll add the fixture and snapshot with no compiler changes.

  3. irimias57 commented on Oct 20, 2026

    @irimias57
    MemberAuthor

    Thanks for picking this up, @codewithzubair07 — it’s yours! The fixture-and-snapshot-only approach sounds exactly right. Please feel free to ask if anything is unclear.

  4. added theissue type on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

compilerCompiler, tokenizer, codegen, and language-semantics workeasySmall, clearly scoped changes with a straightforward approach.help wantedExtra attention is needed

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions