-
Notifications
You must be signed in to change notification settings - Fork 190
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
Inheriting from nil fails too late #246
Comments
👍 After delving into some of Perl 6 code, I very strongly agree with @fendrin that this fails too late. I suggest that the translator fail as soon as possible once it encounters a case of inheriting from nil. (Perhaps, if the 'compiler' failing is not desirable, the Lua code that creates the constructor might error if it detects that it will inherit from nil before it can be called.) |
With the rest of MoonScript, the only required external dependency when compiling |
There are currently no runtime checks that throw errors in any moonscript generated code. Should I add dependency on |
I vote for naming the variable after the class name, since you don't currently depend on (Is there anywhere else the generic |
This fails when the constructor of "Some" is called.
The error message
isn't that helpful before you look into the implementation details of class.
I suggest to let the code that defines the class check for nil parent and write a more useful error message.
The text was updated successfully, but these errors were encountered: