Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

InsertUnicodeExtension when called from ApplyUnicodeExtensionToTag cannot fail #56

Closed
anba opened this issue Aug 8, 2018 · 1 comment

Comments

@anba
Copy link
Contributor

anba commented Aug 8, 2018

ApplyUnicodeExtensionToTag, step 10.a

  1. If newExtension is not the empty String, then
    a. Let locale be ? InsertUnicodeExtension(locale, newExtension).

But InsertUnicodeExtension can only fail when locale is either a grandfathered or private-use only tag, see InsertUnicodeExtension, step 3.

  1. If locale matches the privateuse or the grandfathered production, throw a RangeError exception.

And when called from ApplyUnicodeExtensionToTag, locale is never a grandfathered or private-use only tag, because of ApplyUnicodeExtensionToTag, step 2.

  1. If tag matches the privateuse or the grandfathered production, then
    ...
    d. Return result.
littledan added a commit that referenced this issue Aug 8, 2018
littledan added a commit that referenced this issue Aug 8, 2018
@littledan
Copy link
Member

Fixed by #66

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants