Skip to content

Should we allow to open enumerations? #154

Open
@echebbi

Description

@echebbi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions