mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
inference: stop tree up traversal when lambda expression is currently checked
EA-76546 - assert: InferenceSessionContainer.treeWalkUp IDEA-150168; IDEA-150166
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
import java.util.Optional;
|
||||
|
||||
class Test {
|
||||
public static void main(String[] args) {
|
||||
Optional<Either<IllegalArgumentException, String>> eith =
|
||||
Optional.of(new Either<IllegalArgumentException, String>());
|
||||
|
||||
eith.map(either -> {
|
||||
String foo = Test.foo(either);
|
||||
return foo;
|
||||
}).orElse("Hello");
|
||||
|
||||
eith.map(either -> {
|
||||
return Test.foo(either);
|
||||
}).orElse("Hello");
|
||||
|
||||
eith.map(either -> Test.foo(either)).orElse("Hello");
|
||||
}
|
||||
|
||||
private static <X extends Exception, A> A foo(Either<X, A> either) throws X { return null; }
|
||||
}
|
||||
|
||||
class Either<L, R> { }
|
||||
Reference in New Issue
Block a user