blob: 80fb846e3b36243d7bc803500ef9e8c09b0f20e1 [file] [log] [blame]
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
class Foo {
@Contract("null->false")
boolean plainDelegation(Object x) {
return <warning descr="Contract clause 'null -> false' is violated">bar(2, x)</warning>;
}
@Contract("_,null->true")
boolean bar(int i, @Nullable Object foo) {
return foo == null;
}
}