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

Should we allow to open enumerations? #154

Open
echebbi opened this issue Jun 26, 2020 · 0 comments
Open

Should we allow to open enumerations? #154

echebbi opened this issue Jun 26, 2020 · 0 comments
Labels

Comments

@echebbi
Copy link
Collaborator

echebbi commented Jun 26, 2020

Context

Currently ALE doesn't support to open enumerations. More specifically, it assumes that only EClass are open and doesn't consider the case where one attempts to open an EEnum:

ExtendedClass cls = implemFactory.createExtendedClass();
EClassifier resolvedType = resolve(baseCls);
if(resolvedType instanceof EClass)
cls.setBaseClass((EClass)resolvedType);

This leads to multiple errors in validators and in the interpreters when we access extendedClass.getBaseClass() without checking whether the base class actually exists.

Workaround

For now I'm going to add guards to prevent being bloated by this kind of error but we need to think about it.

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

No branches or pull requests

1 participant