Skip to content

Commit

Permalink
fix bug in previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dwightguth committed Aug 16, 2013
1 parent e59337f commit 3bfde4e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion javasources/KTool/src/org/kframework/kil/Production.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,12 @@ public boolean equals(Object obj) {
if (!prd.getItems().get(i).equals(items.get(i)))
return false;
}
if (!prd.getAttributes().get("klabel").equals(getAttributes().get("klabel"))) {
String klabel1 = prd.getAttributes().get("klabel");
String klabel2 = getAttributes().get("klabel");
if ((klabel1 == null && klabel2 != null) || (klabel1 != null && klabel2 == null)) {
return false;
}
if (klabel1 != null && klabel2 != null && klabel1.equals(klabel2)) {
return false;
}
return true;
Expand Down

0 comments on commit 3bfde4e

Please sign in to comment.