archives

« Bugzilla Issues Index

#4006 — FunctionDeclaration NeedsSuperBinding makes no sense in light of new early errors in ES6 draft rev33


Rev 33 added new language to 14.1.2:

It is a Syntax Error if FormalParameters Contains SuperProperty is true.
It is a Syntax Error if FunctionBody Contains SupeProperty is true.

Presumably, this is because the semantics of super make little sense outside methods, which makes sense.

However, other things that handle FunctionDeclarations and FunctionExpressions do not reflect this change. For example, 14.1.17 still contains checks for SuperProperty. It seems to me that this can never happen because of the early errors above, and should simply return false.

Therefore, also, 14.1.22 and 14.1.23 need never consult NeedsSuperBinding when giving evaluation rules for these productions.


This should be fixed in rev34 (bug 3963).




*** This bug has been marked as a duplicate of bug 3963 ***