mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 19:29:30 +07:00
graph inference: conditional expressions then/else branches inference based on context (IDEA-100453)
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
class Test<U> {
|
||||
public Optional<U> bar(boolean empty, U state) {
|
||||
Optional<U> o = empty ? Optional.empty() : Optional.of(state);
|
||||
return empty ? Optional.empty() : Optional.empty();
|
||||
}
|
||||
|
||||
static class Optional<T> {
|
||||
public static <U> Optional<U> empty() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <U> Optional<U> of(U state) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user