Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

super() in non derived class #2000

Open
peeyush18 opened this issue Oct 9, 2019 · 0 comments
Open

super() in non derived class #2000

peeyush18 opened this issue Oct 9, 2019 · 0 comments

Comments

@peeyush18
Copy link

@peeyush18 peeyush18 commented Oct 9, 2019

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

Actual output

Relevant references

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.