mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IG: fix false negative with switch expression (IDEA-203709)
This commit is contained in:
+6
@@ -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;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
+6
@@ -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);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user