IDEA-187474 Ternary condition is not boolean: add a quick-fix for method call

This commit is contained in:
Tagir Valeev
2018-03-01 14:45:49 +07:00
parent 4002c0e067
commit 2735fd74d5
3 changed files with 37 additions and 13 deletions
@@ -0,0 +1,10 @@
// "Make 'foo' return 'boolean'" "true"
class Test {
void bar() {
System.out.println(foo() ? "x" : "y");
}
boolean foo() {
return 0;
}
}
@@ -0,0 +1,10 @@
// "Make 'foo' return 'boolean'" "true"
class Test {
void bar() {
System.out.println(fo<caret>o() ? "x" : "y");
}
int foo() {
return 0;
}
}