title: Error with @CompileStatic on grails service that uses google Cache
body: <p>Using grails 2.3.2, Java 1.6.0_65, trying to compile the following placed in the services directory. Even if it is not a service, and just put in the src/groovy directory, it still causes the same compile error.</p>
  
  <p>I installed groovy 2.1.9 (and tried 2.2.0) which appears to be the version used by grails 2.3.2 and ran <code>groovyc -cp quava-13.0.1.jar TestCache.groovy</code> and it worked fine. So it appears to be something related to grails.</p>
  
  <pre><code>package somewhere
  
  import com.google.common.cache.Cache
  import groovy.transform.CompileStatic
  
  @CompileStatic
  class TestCacheService {
      private final Cache&lt;URL, String&gt; cache
  
      TestCacheService() {
          cache = null
      }
  }
  </code></pre>
  
  <p>I receive the following error:</p>
  
  <pre><code>General error during instruction selection: sun.reflect.annotation.EnumConstantNotPresentExceptionProxy
  java.lang.ArrayStoreException: sun.reflect.annotation.EnumConstantNotPresentExceptionProxy
  at sun.reflect.annotation.AnnotationParser.parseEnumArray(AnnotationParser.java:673)
  at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:462)
  at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286)
  at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222)
  at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
  at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
  at java.lang.Class.initAnnotationsIfNecessary(Class.java:3127)
  at java.lang.Class.getAnnotation(Class.java:3086)
  at sun.reflect.annotation.AnnotationType.&lt;init&gt;(AnnotationType.java:113)
  at sun.reflect.annotation.AnnotationType.getInstance(AnnotationType.java:66)
  at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:202)
  at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
  at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
  at java.lang.reflect.Method.declaredAnnotations(Method.java:693)
  at java.lang.reflect.Method.getDeclaredAnnotations(Method.java:686)
  at java.lang.reflect.AccessibleObject.getAnnotations(AccessibleObject.java:175)
  at org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:362)
  at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:258)
  at org.codehaus.groovy.ast.ClassNode.getInterfaces(ClassNode.java:353)
  at org.codehaus.groovy.ast.ClassNode.declaresInterface(ClassNode.java:945)
  at org.codehaus.groovy.ast.ClassNode.implementsInterface(ClassNode.java:925)
  at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.getResultType(StaticTypeCheckingVisitor.java:2629)
  at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitBinaryExpression(StaticTypeCheckingVisitor.java:421)
  at org.codehaus.groovy.ast.expr.BinaryExpression.visit(BinaryExpression.java:49)
  at org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorSupport.java:69)
  at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpressionStatement(ClassCodeVisitorSupport.java:193)
  at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
  at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:35)
  at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:163)
  at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
  at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:101)
  at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:112)
  at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitConstructorOrMethod(StaticTypeCheckingVisitor.java:1435)
  at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructor(ClassCodeVisitorSupport.java:119)
  at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1051)
  at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:50)
  at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitClass(StaticTypeCheckingVisitor.java:162)
  at org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitClass(StaticCompilationVisitor.java:110)
  at org.codehaus.groovy.transform.sc.StaticCompileTransformation.visit(StaticCompileTransformation.java:60)
  at org.codehaus.groovy.transform.ASTTransformationVisitor.visitClass(ASTTransformationVisitor.java:132)
  at org.codehaus.groovy.transform.ASTTransformationVisitor$2.call(ASTTransformationVisitor.java:176)
  at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1036)
  at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:572)
  at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:550)
  at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:527)
  at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:506)
  at org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:59)
  at org.codehaus.groovy.tools.FileSystemCompiler.doCompilation(FileSystemCompiler.java:215)
  at org.codehaus.groovy.ant.Groovyc.runCompiler(Groovyc.java:1104)
  at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:1155)
  at org.codehaus.groovy.grails.compiler.Grailsc.compile(Grailsc.java:78)
  at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:770)
  at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
  </code></pre>
  
  <p>Is this a known bug?
  Any workaround?</p>