shapesecurity / shift-parser-js

ECMAScript parser that produces a Shift format AST
http://shift-ast.org/parser.html
Apache License 2.0
249 stars 28 forks source link

`super` in nested class method name #358

Closed bakkot closed 7 years ago

bakkot commented 7 years ago

Everyone seems to agree that

({
  a(){
    class b {
      [super.c](){}
    }
  }
});

is legal code. I haven't read the spec closely enough to know for sure, but I strongly suspect it is. The early error checker currently rejects it.

bakkot commented 7 years ago

Likewise improperly rejected:

(class a extends Object {
  constructor(){
    class b {
      [super()](){}
    }
  }
});