Skip to content

Commit

Permalink
Set module name for min/max parameters, fixes #722
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbattle committed May 18, 2020
1 parent 8ba0164 commit 92aa706
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -413,13 +413,14 @@ private PTypeList getPTypes(ATypeDefinition typedef) {

private void setMinMax(AOrdRelation ordRelation, ATypeDefinition typeDef) {
ILexLocation loc = ordRelation.getRelDef().getLocation().clone();
String module = typeDef.getName().getModule();

PExp left = AstFactoryTC.newAVariableExp(new LexNameToken("", "x", loc.clone()));
PExp right = AstFactoryTC.newAVariableExp(new LexNameToken("", "y", loc.clone()));
PExp left = AstFactoryTC.newAVariableExp(new LexNameToken(module, "x", loc.clone()));
PExp right = AstFactoryTC.newAVariableExp(new LexNameToken(module, "y", loc.clone()));

List<PPattern> params = new LinkedList<>();
params.add(AstFactory.newAIdentifierPattern(new LexNameToken("", "x", loc.clone())));
params.add(AstFactory.newAIdentifierPattern(new LexNameToken("", "y", loc.clone())));
params.add(AstFactory.newAIdentifierPattern(new LexNameToken(module, "x", loc.clone())));
params.add(AstFactory.newAIdentifierPattern(new LexNameToken(module, "y", loc.clone())));
List<List<PPattern>> parameters = new Vector<List<PPattern>>();
parameters.add(params);

Expand Down

0 comments on commit 92aa706

Please sign in to comment.