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:
Anna Kozlova
2016-01-08 20:15:17 +01:00
parent f732fb3742
commit 31c6b67ce6
5 changed files with 53 additions and 38 deletions
@@ -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> { }