push condition in call: fix different qualifiers (IDEA-147901)

This commit is contained in:
Anna Kozlova
2015-11-13 16:07:17 +01:00
parent cbbd0e4456
commit 64ff5ff961
6 changed files with 139 additions and 27 deletions
@@ -0,0 +1,7 @@
// "Push condition 'b' inside method call" "true"
class Foo {
void bar(boolean b){
String s = foo(b ? "true" : "false", true).substring(0);
}
String foo(String p, boolean b) {return p;}
}
@@ -0,0 +1,7 @@
// "Push condition 'b' inside method call" "true"
class Foo {
void bar(boolean b){
String s = foo("true", true).substring(b ? 1 : 2).substring(0);
}
String foo(String p, boolean b) {return p;}
}
@@ -0,0 +1,7 @@
// "Push condition 'b' inside method call" "true"
class Foo {
void bar(boolean b){
String s = b <caret>? foo("true", true).substring(0) : foo("false", true).substring(0);
}
String foo(String p, boolean b) {return p;}
}
@@ -0,0 +1,7 @@
// "Push condition 'b' inside method call" "false"
class Foo {
void bar(boolean b){
String s = b <caret>? foo("true", true).substring(0) : foo("false", true).substring(1);
}
String foo(String p, boolean b) {return p;}
}
@@ -0,0 +1,7 @@
// "Push condition 'b' inside method call" "true"
class Foo {
void bar(boolean b){
String s = b <caret>? foo("true", true).substring(1).substring(0) : foo("true", true).substring(2).substring(0);
}
String foo(String p, boolean b) {return p;}
}