ModelingValueGroup / dclareForMPS

Adding declarative, reactive and incremental rules to MPS
GNU Lesser General Public License v3.0
21 stars 4 forks source link

compilation problem in repository rule #132

Closed tombrus closed 1 year ago

tombrus commented 1 year ago

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);
      }
tombrus commented 1 year ago

fixed