IG: fix false negative with switch expression (IDEA-203709)

This commit is contained in:
Bas Leijdekkers
2018-12-06 13:02:00 +01:00
parent 9e86a35047
commit ba48ec7de0
3 changed files with 13 additions and 4 deletions
@@ -19,4 +19,10 @@ class BigDecimalEquals {
System.out.println("equals");
}
}
boolean test(int x, BigDecimal d1, BigDecimal d2) {
return switch(x) {
default -> d1.compareTo(d2) == 0;
};
}
}
@@ -19,4 +19,10 @@ class BigDecimalEquals {
System.out.println("equals");
}
}
boolean test(int x, BigDecimal d1, BigDecimal d2) {
return switch(x) {
default -> d1.equals(d2);
};
}
}