new inference: missed condition in conditional expression (IDEA-127752)

This commit is contained in:
Anna Kozlova
2014-07-23 18:37:22 +02:00
parent c88f288bda
commit 24be503eb2
3 changed files with 23 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
class Test {
static class TKey<T> {
}
public interface Getter {
<T> T getValue(TKey<T> key);
}
static final TKey<Boolean> KEY_B = new TKey<>();
public static void f(Getter getter) {
String name = getter.getValue(KEY_B) ? "foo" : "bar";
}
}