Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 389044

Summary: Cannot wrap an enum defined in an interface
Product: [Modeling] EMF Reporter: Jan Rosczak <jan.rosczak>
Component: XcoreAssignee: Ed Merks <Ed.Merks>
Status: CLOSED FIXED QA Contact: Ed Merks <Ed.Merks>
Severity: major    
Priority: P3 CC: jan.rosczak
Version: 1.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Jan Rosczak CLA 2012-09-07 07:59:31 EDT
In my Xcore model I am unable to wrap an enum defined in an interface.

For example I have the following interface:

interface RelationshipDescription {
    public enum Cardinality {
       NONE, ONE, MANY
    }
}


Then in my Xcore model I would like to use the enum Cardinality:

type Cardinality wraps RelationshipDescription$Cardinality
create {
   return RelationshipDescription$Cardinality::valueOf(it)
}



The type RelationshipDescription$Cardinality is found and correctly imported. But the code for "create" is marked as follows: Incompatible types. Expected null but was RelationshipDescription.Cardinality.
Comment 1 Ed Merks CLA 2012-09-07 08:04:47 EDT
The fix is committed to 2.8 and master.
Comment 2 Ed Merks CLA 2012-10-02 03:41:50 EDT
The changes are available in the latest builds.