feat(rust)!: removed lossy type coercion for primitive numeric types …#27197
Draft
dhvish wants to merge 1 commit intopola-rs:mainfrom
Draft
feat(rust)!: removed lossy type coercion for primitive numeric types …#27197dhvish wants to merge 1 commit intopola-rs:mainfrom
dhvish wants to merge 1 commit intopola-rs:mainfrom
Conversation
Member
|
The operation should still be supported, but be done properly. The lack of a good supertype is no excuse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…(#25624)
From what I understand,
is_incurrently falls back to lossy supertype conversion withtry_get_supertypeif the lossless upcast (get_numeric_upcast_supertype_lossless) doesn't work.I made these assumptions in my changes to
resolve_is_intry_get_supertype.a != bbranch since thea == bmatch arm ensures thata != bwill always be true (right?).Let me know if this aligns with the intended direction. I'll fix stale/add tests for this once I get the confirmation.
Currently these tests fail. Most of these make sense as they involve lossy numeric casting.