-
Notifications
You must be signed in to change notification settings - Fork 196
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
Missing error when derived class does not call super
in initializer
#4277
Comments
super
is missing in initializersuper
in initializer
i can take look if its still open? |
Thanks @KrishnaSindhur, I assigned the issue to you. Please let us know if you have any questions or need pointers |
Hi, This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
Hi, This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
Hi, This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. |
This now correctly yields the desired error message (Wing V0.74.30): Failed to compile.
error: Missing super() call as first statement of Bar's constructor
--> wing/main.w:6:9
|
6 | new() {}
| ^^ |
Fixed in #6351 |
I tried this:
This happened:
It compiles
I expected this:
A type checking error, saying that
Bar
's initializer needs asuper
call since it is a derived classIs there a workaround?
No response
Component
Compiler
Wing Version
0.33.3
Node.js Version
18.14.1
Platform(s)
MacOS
Anything else?
No response
Community Notes
The text was updated successfully, but these errors were encountered: