Skip to content

Conversation

@HertzDevil
Copy link
Contributor

Fixes #16467.

@HertzDevil HertzDevil added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:macros labels Dec 2, 2025
@ysbaddaden
Copy link
Contributor

ysbaddaden commented Dec 2, 2025

Question: No support for i128 literals? => #16469

@straight-shoota straight-shoota added this to the 1.19.0 milestone Dec 2, 2025
@ysbaddaden
Copy link
Contributor

Actually, I have second thoughts about this: instead of returning an i32 or i64 number, shouldn't we validate that the value is within i32 limits (to match corelib expectation)?

Returning any number would be the job of a #to_num method, that could use the best kind (or explicitly given one).

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

Labels

kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:macros

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StringLiteral#to_i returns unusable NumberLiterals on value overflow

3 participants