Skip to content

fix(aiken-lang): diagnose oversized @tag values instead of panicking#1328

Open
SAY-5 wants to merge 1 commit into
aiken-lang:mainfrom
SAY-5:fix/oversize-tag-diagnostic
Open

fix(aiken-lang): diagnose oversized @tag values instead of panicking#1328
SAY-5 wants to merge 1 commit into
aiken-lang:mainfrom
SAY-5:fix/oversize-tag-diagnostic

Conversation

@SAY-5

@SAY-5 SAY-5 commented May 19, 2026

Copy link
Copy Markdown
Contributor

An oversized @tag(...) integer value (above usize::MAX) reached value.parse().unwrap() in TypedDataType::check_decorators and panicked the compiler instead of producing a normal diagnostic. The parse error is now surfaced as a DecoratorValidation diagnostic, matching the issue's expected behavior.

Fixes #1319

When an enum constructor's @tag decorator value exceeds usize::MAX,
the type checker now emits a DecoratorValidation diagnostic via
value.parse::<usize>(), replacing the previous unwrap() panic in
TypedDataType::check_decorators.

Fixes aiken-lang#1319
@SAY-5 SAY-5 requested a review from a team as a code owner May 19, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Oversized tag integer panics validation

1 participant