Skip to content

fix(hy-check): fold float constant expressions and >128-bit shifts in const_overflow.rs (HYB-E6002 / HYB-E6006) (fixes #3986) - #3987

Open
bradwue313 wants to merge 2 commits into
limitlessprojects:mainfrom
bradwue313:fix-const-overflow-folded-float-and-huge-conv
Open

bradwue313 wants to merge 2 commits into
limitlessprojects:mainfrom
bradwue313:fix-const-overflow-folded-float-and-huge-conv

Conversation

@bradwue313

Copy link
Copy Markdown
Contributor

Summary

  • Fold named and binary float constant expressions in check_const_overflow_init and check_const_overflow_assign (crates/hy-check/src/const_overflow.rs) to emit HYB-E6002 when truncated or out of range.
  • Handle ConstFold::TooBig and folded float constant expressions in conv_const so int(1 << 200) and int(1.5 + 1.0) emit HYB-E6006.
  • Add unit tests covering both diagnostics.

Fixes #3986

@github-actions github-actions Bot added the bot:stale-base Shepherd: behind main beyond threshold label Nov 8, 2026
@bradwue313

Copy link
Copy Markdown
Contributor Author

Synced with latest main (a5e06128, 0 behind main, mergeable: true), compiler and quick checks passing; ready for Session 188 review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:stale-base Shepherd: behind main beyond threshold

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hy-check: named/folded float constants in integer init/assign and >128-bit shifts in conversions bypass HYB-E6002 / HYB-E6006

1 participant