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,17 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
class C {
void foo(@Nullable Object o) {
if (o != null)
<selection>new Runnable() {
@Override
public void run() {
bar(o);
}
}</selection>.run();
}
void bar(@NotNull Object o) {
}
}