extract PsiPrecedenceUtil as read-only part of ParenthesisUtils

leave methods to ensure compatibility, to be inlined and deprecated in separate commit (IDEA-CR-30329)
This commit is contained in:
Anna.Kozlova
2018-03-09 16:38:07 +01:00
parent a00d19098c
commit e3f42bdb9b
10 changed files with 364 additions and 259 deletions
@@ -0,0 +1,6 @@
// "Remove redundant cast(s)" "true"
class Test {
{
double d = -1e20 + (1e20 - 1);
}
}
@@ -0,0 +1,8 @@
// "Remove redundant cast(s)" "true"
class Test {
{
int i = 1;
int j = 2;
System.out.println(j * (i % j));
}
}
@@ -0,0 +1,6 @@
// "Remove redundant cast(s)" "true"
class Test {
{
String s = "" + (1 + 2);
}
}
@@ -0,0 +1,6 @@
// "Remove redundant cast(s)" "true"
class Test {
{
double d = -1e20 + (do<caret>uble)(1e20 - 1);
}
}
@@ -0,0 +1,8 @@
// "Remove redundant cast(s)" "true"
class Test {
{
int i = 1;
int j = 2;
System.out.println(j * (i<caret>nt)(i % j));
}
}
@@ -0,0 +1,6 @@
// "Remove redundant cast(s)" "true"
class Test {
{
String s = "" + (in<caret>t) (1 + 2);
}
}