Skip to content

Normative: Use the correct decimal digit count for non-decimal inputs - #137

Merged
jessealama merged 2 commits into
tc39:mainfrom
gibson042:gh-135-non-decimal-digit-count
Jul 15, 2026
Merged

Normative: Use the correct decimal digit count for non-decimal inputs#137
jessealama merged 2 commits into
tc39:mainfrom
gibson042:gh-135-non-decimal-digit-count

Conversation

@gibson042

Copy link
Copy Markdown
Member

Fixes #135

Comment thread spec.emu
1. Let _digitCount_ be the count of digits in the decimal representation of _intlMV_.[[Value]].
1. Else,
1. Let _digitCount_ be _intlMV_.[[StringDigitCount]].
1. Assert: _digitCount_ ≥ 1.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assertion fails if value is the empty string. I think basing the conditional above on intlMV.[[StringDigitCount]] being 0 might work as intended?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, good catch. Fixed.

@jessealama
jessealama merged commit 9f0f857 into tc39:main Jul 15, 2026
1 of 2 checks passed
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.

Constructor parses non-decimal Strings but are stored without precision

3 participants