archives

« Bugzilla Issues Index

#4039 — 15.1.1: "However, such function code does not include ArrowFunction function code."


In 15.1.1 "Static Semantics: Early Errors",
bullets 3 and 4 say:
It is a Syntax Error if StatementList Contains <foo> unless the source code
containing <foo> is eval code that is being processed by a direct eval that
is contained in function code. However, such function code does not include
ArrowFunction function code.

The significance of the last sentence is unclear.

Is it merely reminding the reader of the definition of 'function code', where the function code of a particular function does not include the function code of any nested ArrowFunction (among other things)? If so, it could just be a Note.

Or is it actually altering the semantics of the preceding sentence? If so, then this would be clearer:
... contained in function code that is not ArrowFunction function code.


This is the case that the bullets are trying to describe:

//top level of a script
let f= x+> {
eval("super.foo"); //but arrow function f doesn't have a visible super binding
};


10.2 is actually a little vague about whether or not the body of such an arrow function is "function code"


So it sounds like the the second interpretation is the intended one.


fixed in rev35 editor's draft


fixed in rev35