Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grammar and prose are inconsistent about whether undefined is a primitive type #1139

Closed
petervanderbeken opened this issue May 4, 2022 · 0 comments · Fixed by #1140
Closed

Comments

@petervanderbeken
Copy link

The grammar has (see https://webidl.spec.whatwg.org/#index-prod-PrimitiveType):

PrimitiveType ::
    UnsignedIntegerType
    UnrestrictedFloatType
    undefined
    boolean
    byte
    octet
    bigint

which seems to imply that undefined is a primitive type.

Primitive types are defined as (see https://webidl.spec.whatwg.org/#dfn-primitive-type): bigint, boolean and the numeric types, which doesn't include undefined.

I think it makes sense to exclude undefined from the primitive types, and the simplest solution would be to move it in the grammar from PrimitiveType to DistinguishableType.

EdgarChen added a commit to EdgarChen/webidl that referenced this issue May 4, 2022
EdgarChen added a commit that referenced this issue May 5, 2022
Exclude undefined from the PrimitiveType in grammar

Closes #1139.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant