archives

« Bugzilla Issues Index

#4510 — 19.2.1.1.1 CreateDynamicFunction: Early ReferenceErrors not allowed, changed to SyntaxError


19.2.1.1.1 RuntimeSemantics: CreateDynamicFunction(constructor, newTarget, kind, args)

Steps 11 and 13 should allow to throw early ReferenceErrors.


Also: As currently specified, implementations are required to parse the body before the parameters. That means `Function("a=0++", "<invalid>")` throws a SyntaxError per the current spec, but implementations should be allowed to throw a ReferenceError if they parse the parameters before the body.


Fixed in ES2016 Draft (1b2ecf4).