ConstantExpressionVisitor fixes

1. Relational operators are promoted according to JLS, not always to double type (IDEA-199775)
2. Casting to boxed type is disabled, as JLS 15.28 suggests
Result of boxed comparison like (Long)128L == (Long)128L is unknown now as size of boxing cache is not specified in JLS
This commit is contained in:
Tagir Valeev
2018-10-02 12:59:27 +07:00
parent 19b4764435
commit ec3b05f6a3
5 changed files with 60 additions and 48 deletions
@@ -0,0 +1,4 @@
// "Replace '0x7fffffffffffffffL == 0x7ffffffffffffffeL' with constant value 'false'" "true"
class Test {
boolean result = false;
}
@@ -0,0 +1,4 @@
// "Replace '0x7fffffffffffffffL == 0x7ffffffffffffffeL' with constant value 'false'" "true"
class Test {
boolean result = 0x7fffffffffffffffL<caret> == 0x7ffffffffffffffeL;
}