lambda: stop at method if it's located inside lambda (IDEA-131087)

(cherry picked from commit 890ffa719208e467b1ba238d248dbbf102c71b76)
This commit is contained in:
Anna Kozlova
2014-10-13 19:33:05 +02:00
parent 74f5498b6b
commit b2a07e2eee
12 changed files with 114 additions and 63 deletions
@@ -0,0 +1,24 @@
import java.util.concurrent.Callable;
import java.util.stream.Stream;
import static java.util.Arrays.stream;
class Test {
public static Callable<Bar> foo(final String[] s) {
return () -> new Bar() {
@Override
public Stream<Number> baz() {
return zip(stream(s));
}
};
}
interface Bar {
Stream<Number> baz();
}
public static <L, O> Stream<O> zip(Stream<L> lefts) {
return null;
}
}
@@ -0,0 +1,16 @@
// "Add Exception to Method Signature" "true"
class C {
interface I {
void a() throws InterruptedException;
}
{
Callable<I> i = () -> {
return new I() {
public void a() throws InterruptedException {
Thread.sleep(2000);
}
};
};
}
}
@@ -0,0 +1,16 @@
// "Add Exception to Method Signature" "true"
class C {
interface I {
void a();
}
{
Callable<I> i = () -> {
return new I() {
public void a() {
Thread.sl<caret>eep(2000);
}
};
};
}
}