Skip to content

fix: return error on out-of-range numeric casts instead of wrapping - #372

Open
AdamMagued wants to merge 1 commit into
spf13:masterfrom
AdamMagued:fix-issue-356
Open

AdamMagued wants to merge 1 commit into
spf13:masterfrom
AdamMagued:fix-issue-356

Conversation

@AdamMagued

Copy link
Copy Markdown

Fixes #356

Summary

  • Added bounds verification in integer and unsigned integer cast methods to return an error when values exceed target type range.
  • Added comprehensive unit tests covering overflow and underflow scenarios across integer types.

Verified via container sandbox test suite.

Signed-off-by: AdamMagued <adamismailmageud@gmail.com>
@CLAassistant

CLAassistant commented Oct 9, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@AdamMagued

Copy link
Copy Markdown
Author

Closing PR to keep active pull requests within repository limits.

@AdamMagued AdamMagued closed this Oct 9, 2026
@AdamMagued

Copy link
Copy Markdown
Author

Reopening: work on this pull request is active, independent, and ready for review.

@AdamMagued AdamMagued reopened this Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Out-of-range numeric conversions silently wrap instead of erroring (ToInt64E(uint64max) == -1)

2 participants