IDEA-112222 Validate @Contract annotation is related to the code

This commit is contained in:
peter
2014-06-01 17:20:57 +02:00
parent b09762d64c
commit 5d8ee45b19
21 changed files with 547 additions and 149 deletions
@@ -0,0 +1,11 @@
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.Nullable;
class Foo {
@Nullable
@Contract ( "_ -> null")
String foo(String s) {
return <warning descr="Contract clause '_ -> null' is violated">"42"</warning>;
}
}