IDEA-139301 "Constant conditions & exceptions" flaggs nullable expression when implementing a method returning void

This commit is contained in:
peter
2015-04-16 19:11:45 +03:00
parent 8d049b8d7c
commit 51e23e6063
3 changed files with 14 additions and 1 deletions
@@ -0,0 +1,12 @@
import org.jetbrains.annotations.Nullable;
class Example {
void foo() {
Runnable runnable = () -> bar();
}
@Nullable
String bar() {
return null;
}
}
@@ -77,6 +77,7 @@ public class DataFlowInspection8Test extends LightCodeInsightFixtureTestCase {
}
public void testMethodReferenceOnNullable() { doTest(); }
public void testNullableVoidLambda() { doTest(); }
public void testNullableForeachVariable() {
setupCustomAnnotations();