-
Notifications
You must be signed in to change notification settings - Fork 6
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
Opening a class that does not exist should raise an error #77
Opening a class that does not exist should raise an error #77
Conversation
Because: - users should not be able to write "open class foo" if foo has not been defined in an Ecore metamodel. How: - test the base class of extended classes in OpenClassValidator
cb8151b
to
68c7793
Compare
For public record: the code used to check whether the opened class exists is not 100% reliable at the moment. Indeed, when building the AST, if the base class does not exist then the type of the opened class is set to I first decided to assume that each time an opened class has I believe that the proper way to solve this would be to update the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
I fully agree about your comment "resolve method should return an Optional" the line bellow Line 554 in fa71c1f
clearly states that this is an error case that is not correctly handled. I suggest opening an issue to track its resolution. |
Fix #19.
1. Enhance the type checker to show an error when opening a class that does not exist:
Here,
Foo
can be:Otherwise, an error is shown.
2. Enhance the type checker to show a warning when opening a class that has namesakes
Will raise a warning if a class
Foo
is defined:helloworld
,helloworld