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
Class declaration do not check for duplicates #24
Comments
SquiLu has fixed this and expanded the subset of C/C++ accepted syntax see this commit: |
because classes "newmember" can be trapped by _newmember, this is a desirable sideffect. I use it in our engine for implementing remote procedure call. |
Good point but checking it at compile time do not break what you describe at runtime, and from the syntax and logic point of view it's an error to declare more than one member with the same name, what will be the result of call to that member name ? Cheers ! |
Can you give your opinion about accepting a bigger subset of C/C++ in SquiLu, what would be the downsides ? Would you be interested in join efforts ? Cheers ! |
How to justify this example at compile time:
|
Well "terra" seems to be a quite different language than lua. The syntax is similar but looks like quite a big effort, it's like writing a C++ like language that spits out lua native closures.I must admit it is interesting but to make it into something useful you need debuggers and ide support. That would be my biggest concern, looks like a huge effort. |
Yes C++ allow shadow of members on child classes but not in the class itself.
Cheers ! |
Fixing this in SquiLu I found a piece of code I have with a big class where I had one member function defined twice (an error). |
I do not think that it's a good idea leave this issue as it is ! |
Hello !
Squirrel do not check for duplicates in class declarations see example bellow that compiles without errors:
The text was updated successfully, but these errors were encountered: