Open gibson042 opened 1 day ago
Hi @gibson042,
This is a bug and we shall fix it, but it is sad to see how many special cases need to be handled explicitly to emulate side effects of historical implementations in useless corner cases.
Thank you for this report.
There are details at https://github.com/tc39/test262/issues/4332 , but the summary is that QuickJS incorrectly rejects as invalid attempts to create scoped declarations named
undefined
.For example, this should print "START" and then "PASS", but instead throws a SyntaxError before anything happens (which is only warranted when such a declaration appears at the top-level scope):
It may also be worth noting that the analogous
NaN
andInfinity
cases are handled correctly.