esprima
esprima copied to clipboard
super() in non derived class
super() in non derived class constructors should throw a syntax error
Steps to reproduce
esprima.parse('class A{
constructor(){
super();
}
}')
Expected output
throw an syntax error. in firefox
SyntaxError: super() is only valid in derived class constructors
in chrome
Uncaught SyntaxError: 'super' keyword unexpected here