Java: Infer nullability of extracted method's parameter in presence of a lambda or an anonymous class (IDEA-175727)

This commit is contained in:
Pavel Dolgov
2017-08-22 12:58:24 +03:00
parent f9c4ceda7c
commit 40e2e78e1e
22 changed files with 408 additions and 22 deletions
@@ -0,0 +1,13 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
class X {
void foo(@NotNull Object o) {
<selection>Runnable r = new Runnable() {
@Override
public void run() {
System.out.println(o);
}
};</selection>
}
}