Abstract: Static compilation
The code is currently in early experimental mode. This means that the implementation is far from complete, and likely to crash your JVM. Be warned. However, if you want to test static compilation and understand the semantics differences, feel free to checkout the experimental-static-compiler branch from Git. Starting from groovy-2.0.0-beta-3, the experimental compiler branch will be merged into master.
Alternatively, using Groovy 2.0.0-beta-2, you can download the attached jar and add it to your classpath to activate the @CompileStatic annotation. Note that you must use groovy.jar (not groovy-all.jar) and the additional jar with the annotation must be first in the classpath, because it overwrites classes from standard Groovy. Currently, the experimental compiler only supports annotations at the method level.