Precise nullability reporting: test-data fixed (IDEA-CR-40527)

This commit is contained in:
Tagir Valeev
2018-11-27 17:25:18 +07:00
parent c6448ec5d0
commit ef669e0529
3 changed files with 3 additions and 3 deletions
@@ -11,6 +11,6 @@ class Npe {
}
void bar() {
Object o = foo(<warning descr="Argument '(Object)nullable()' might be null">(Object)nullable()</warning>); // null should not be passed here.
Object o = foo((Object)<warning descr="Argument 'nullable()' might be null">nullable()</warning>); // null should not be passed here.
}
}
@@ -2,7 +2,7 @@ import org.jetbrains.annotations.NotNull;
class Foo {
void main() {
foo(<warning descr="Passing 'null' argument to parameter annotated as @NotNull">(String) null</warning>);
foo((String) <warning descr="Passing 'null' argument to parameter annotated as @NotNull">null</warning>);
}
static void foo(@NotNull String s) {}
@@ -26,7 +26,7 @@ class Test {
Object x = null;
doNotNull(<warning descr="Passing 'null' argument to parameter annotated as @NotNull">x</warning>);
x = null;
doNotNull(<warning descr="Passing 'null' argument to parameter annotated as @NotNull">(x)</warning>);
doNotNull((<warning descr="Passing 'null' argument to parameter annotated as @NotNull">x</warning>));
}
@NotNull Object testReturn(Object x1, Object x2) {