15.1.1 Static Semantics: Early Errors
> It is a Syntax Error if StatementList Contains super unless
> the source code containing super is eval code that is being
> processed by a direct eval that is contained in function code.
> It is a Syntax Error if StatementList Contains NewTarget unless
> the source code containing NewTarget is eval code that is being
> processed by a direct eval that is contained in function code.
(This is probably a follow-up of bug 3844.)
The early error restrictions are incomplete for arrow functions which are not embedded in a function with a this-binding.
For example this script:
---
(() => eval("new.target"))();
---
Does not produce an early error with the current semantics because the eval script is executed within function code. But when `new.target` gets evaluated, 8.3.4 GetNewTarget ( ) will throw an assertion error in step 2.
fixed in rev34 editor's draft
see 15.1.1 and 14.2.3
fixed in rev34