google-code-export / esprima

Automatically exported from code.google.com/p/esprima
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

It should be a parse error if a class static method contains a 'super' #633

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
As of the latest version of the spec, it is no longer statically valid to have 
references to 'super' in static class methods:

https://people.mozilla.org/~jorendorff/es6-draft.html#sec-class-definitions-stat
ic-semantics-early-errors

Currently esprima will parse this without issue, but it should through a syntax 
error.

Original issue reported on code.google.com by LBLJef...@gmail.com on 4 Feb 2015 at 3:27

GoogleCodeExporter commented 9 years ago
Clarification: It's only invalid to have super() call in *any* method...not 
just static methods.

(this is a recent constraint as of the Jan15 tc39 meeting)

Original comment by LBLJef...@gmail.com on 4 Feb 2015 at 4:09

GoogleCodeExporter commented 9 years ago
Further clarification: super.whatever (member-expression-ish thing) appears to 
still be valid

Original comment by LBLJef...@gmail.com on 4 Feb 2015 at 4:10

GoogleCodeExporter commented 9 years ago
(I wish I could update the title of this issue :/ )

Original comment by LBLJef...@gmail.com on 4 Feb 2015 at 4:10

GoogleCodeExporter commented 9 years ago
Ported

Original comment by mike.she...@gmail.com on 8 Feb 2015 at 5:51