Hi, I cannot make this simple example run with @CompileStatic
(groovy-all 2.0.4, gcontracts-core 1.2.10, java 1.6, inside Groovy/Grails Tool Suite - groovy compiler set to 2.0.4)
What am I doing wrong?
import org.gcontracts.annotations.Requires
@CompileStatic
public class App {
@Requires({x == null}) // x undeclared
String yyy(String x) {
println x
x
}
@Requires({x > 3}) // x undeclared
String xxx(int x){
yyy('aa')
}
public static void main( String[] args ) {
new App().xxx(4)
}
}
Hi, I cannot make this simple example run with @CompileStatic (groovy-all 2.0.4, gcontracts-core 1.2.10, java 1.6, inside Groovy/Grails Tool Suite - groovy compiler set to 2.0.4) What am I doing wrong?