Community
Participate
Working Groups
From the grammar --- TypeA: 'TA' TypeD ({TypeB.x=current} 'x' | {TypeC.x=current} 'y')? name+=STRING; TypeD: name+=ID; --- the folowing types are infered: class TypeA {} class TypeB extends TypeA { ref x; } class TypeC extends TypeA { ref x; } class TypeD extends TypeA { attr name; } this is wrong, because TypeB and TypeC can also have the attribute 'name'. Therefore, the attribute should have been pulled up to TypeA When removing the alternative from the grammar --- TypeA: 'TA' TypeD ({TypeB.x=current} 'x')? name+=STRING; TypeD: name+=ID; --- attribute 'name' is member of TypeA, as expected. This is actually the cause for bug 345521.
Ouch.
for the grammar ---- Model: A ({Me.a = current} b = B)? c=C? ; A : {A} 'a'; B : {B} 'b'; C : {C} 'c'; ---- the editor will meet an error when the input is like this, --- a c --- an exception is thrown. An internal error occurred during: "XtextReconcilerJob". java.lang.IllegalArgumentException: A.c does not exist.
Pushed to master.
Closing all bugs that were set to RESOLVED before Neon.0