IDEA-82925 ('Surround with cast' for conditional, polyadic and assignment expressions should parenthesize those expressions)

This commit is contained in:
Bas Leijdekkers
2012-03-16 13:14:21 +01:00
parent 9d2aeb18a6
commit ec1f3e7655
8 changed files with 57 additions and 6 deletions
@@ -0,0 +1,7 @@
class Test {
void foo(int a, double b) {
if (<selection><caret>a = b</selection>) {
}
}
}
@@ -0,0 +1,7 @@
class Test {
void foo(int a, double b) {
if (((<caret>) (a = b))) {
}
}
}
@@ -1,6 +1,6 @@
class Test {
void foo(int a, double b) {
if (<selection><caret>a + b</selection>) {
if (<selection><caret>a + b + 1</selection>) {
}
}
@@ -1,6 +1,6 @@
class Test {
void foo(int a, double b) {
if (((<caret>) (a + b))) {
if (((<caret>) (a + b + 1))) {
}
}
@@ -0,0 +1,7 @@
class Test {
void foo(int a, double b) {
if (<selection><caret>true ? a : b</selection>) {
}
}
}
@@ -0,0 +1,7 @@
class Test {
void foo(int a, double b) {
if (((<caret>) (true ? a : b))) {
}
}
}