Repository navigation
TSLANG_ISSUES 15: unsigned integer types take part in numeric promotion - #570
Merged
Merged
Conversation
The promotion ladder had no unsigned types, so `u64 * 2` found only the literal's s32 and was done in 32 bits: `2^32 * 2` was 0, and `d *= 256` wrapped to 0 after four bytes. Each unsigned type now follows the signed and signless types of its width (and comes before `index`), so `u64 op s32` is done in u64; an unsigned type paired with a signed or signless one of its own width still takes the other one. Found in native_ts_graphics' stdString(), which cut every NVRHI debug name to four characters (TSLANG_ISSUES.md 15). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ASDAlexander77
added a commit
that referenced
this pull request
Oct 13, 2026
13, 14, 15 and 18 are fixed by #572, #568, #570 and #569. For 16, `%` is fixed by #571 and `/` stays a number. 17 is answered (`Deref(p[i]) = v` stores) and its error names that form since #573. 5 and 6 stay open: they are design questions, not bugs. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
TSLANG_ISSUES.md 15:
u64 * <integer literal>was computed in 32 bits (2^32 * 2 == 0,d *= 256wrapped).numericPromotionOrder()had no unsigned types, sou64 * 2found only the literal's s32. Each unsigned type now follows the signed and signless types of its width. Behaviour changes:u64 op s32/u64 op i32is done in u64 (was s32/i32).u64 op indexis now u64 (wasindex).u32 * 1is still s32).Test:
00int64_mul_literal.ts(*,+,-,*=, and the byte-at-a-time word build from native_ts_graphics'stdString()).Full Release suite with all six TSLANG_ISSUES fixes together: 4074/4074.
🤖 Generated with Claude Code