IDEA-237601 Infer mutation signature from the bytecode

GitOrigin-RevId: d3c47f6a35f948f65f5d447d8561044d7ec9ce23
This commit is contained in:
Tagir Valeev
2020-04-14 18:59:30 +07:00
committed by intellij-monorepo-bot
parent 097416297a
commit d17aa59d6d
54 changed files with 2678 additions and 94 deletions

View File

@@ -12,5 +12,6 @@ import java.lang.annotation.Target;
@Target(ElementType.METHOD)
public @interface ExpectContract {
String value() default "";
String mutates() default "";
boolean pure() default false;
}

View File

@@ -163,6 +163,7 @@ public class Test01 {
return copy;
}
@ExpectContract(mutates="param1")
private static void set(@ExpectNotNull long[] copy) {
copy[1] = 2;
}