quickjs-done-nextgen/tests/bug633/0.js
Ben Noordhuis dfe5675f25
Allow 'undefined' in let or const declaration (#639)
Except at the global scope of a classic script because... who knows,
that's just how it is.

Fixes: https://github.com/quickjs-ng/quickjs/issues/633
2024-10-29 22:55:22 +01:00

7 lines
139 B
JavaScript

/*---
flags: [qjs:no-detect-module]
negative:
phase: parse
type: SyntaxError
---*/
const undefined = 42 // SyntaxError at global scope