Re: [whatwg/webidl] Exclude undefined from the PrimitiveType in grammar (PR #1140)

but

> The type of a constant (matching [ConstType](https://webidl.spec.whatwg.org/#prod-ConstType)) must not be any type other than a [primitive type](https://webidl.spec.whatwg.org/#dfn-primitive-type). If an [identifier](https://webidl.spec.whatwg.org/#dfn-identifier) is used, it must reference a [typedef](https://webidl.spec.whatwg.org/#dfn-typedef) whose type is a primitive type.

and undefined is not a primitive type in

> The primitive types are [bigint](https://webidl.spec.whatwg.org/#idl-bigint), [boolean](https://webidl.spec.whatwg.org/#idl-boolean) and the [numeric types](https://webidl.spec.whatwg.org/#dfn-numeric-type).

So could a constant type be `undefined`?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/pull/1140#issuecomment-1117721115
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/pull/1140/c1117721115@github.com>

Received on Wednesday, 4 May 2022 19:17:21 UTC