compilation problem in repository rule
tombrus opened this issue · comments
I have the following repository rule:
attr set<node<X>> allX := this.modules.allX;
this is correct dclare code but generates incorrect java code:
public Iterable<SNode> translate(SModule e) {
return DclareUtil.<DModule,Set<SNode>>getAttributeValue(Module_BASE.ATTR_X_0, e);
}
The type of e
is SModule
where a DModule
is expected.
The following cast should be inserted since e
can always be cast here:
public Iterable<SNode> translate(SModule e) {
return DclareUtil.<DModule,Set<SNode>>getAttributeValue(Module_BASE.ATTR_X_0, (DModule) e);
}
fixed