[ 
https://issues.apache.org/jira/browse/GROOVY-4811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14593908#comment-14593908
 ] 

ASF GitHub Bot commented on GROOVY-4811:
----------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-groovy/pull/41


> exception while compiling annotation type
> -----------------------------------------
>
>                 Key: GROOVY-4811
>                 URL: https://issues.apache.org/jira/browse/GROOVY-4811
>             Project: Groovy
>          Issue Type: Bug
>          Components: parser-antlr
>    Affects Versions: 1.8-rc-3, 2.4.0-beta-3
>            Reporter: Maxim Medvedev
>
> {code}
> @interface Inter {
>   String[] bar() default "1"
> }
> {code}
> While compiling this annotation type the compiler throws
> java.lang.ClassCastException: org.codehaus.groovy.ast.expr.ConstantExpression 
> cannot be cast to org.codehaus.groovy.ast.expr.ListExpression
>       at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitAnnotationDefaultExpression(AsmClassGenerator.java:316)
>       at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitAnnotationDefault(AsmClassGenerator.java:350)
>       at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:259)
>       at 
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:123)
>       at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:366)
>       at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1056)
>       at 
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:50)
>       at 
> org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:171)
>       at 
> org.codehaus.groovy.control.CompilationUnit$13.call(CompilationUnit.java:763)
>       at 
> org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:957)
>       at 
> org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:542)
>       at 
> org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:520)
>       at 
> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:497)
>       at 
> org.jetbrains.groovy.compiler.rt.GroovyCompilerWrapper.compile(GroovyCompilerWrapper.java:43)
>       at 
> org.jetbrains.groovy.compiler.rt.GroovycRunner.main(GroovycRunner.java:128)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at 
> com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:75)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to