[ 
https://issues.apache.org/jira/browse/GROOVY-11679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Milles updated GROOVY-11679:
---------------------------------
    Language: groovy

> Static type checking fails to handle generic list with empty default in an 
> annotation
> -------------------------------------------------------------------------------------
>
>                 Key: GROOVY-11679
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11679
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static compilation, Static Type Checker
>    Affects Versions: 4.0.26
>            Reporter: Leonard Brünings
>            Priority: Major
>
> Declaring an annotation member like this:
> {code:groovy}
> @groovy.transform.CompileStatic
> @interface Reproducer {
>   Class<? extends Throwable>[] exceptionClasses() default []
> }
> {code}
> ([Groovy 
> WebConsole|https://groovyconsole.dev/?g=groovy_4_0&codez=eNodyj0OwjAMBtDdp_AIS0-AoFJvAGxVB5N8gUhpXDkuP0LcHcT69Ki_mur91blJbUlt7gadl1xwcvEcqM_VYUkC-IjFNK4Bxm9iHoq0tjswno4aG59vpg-5FOzH6YcBi2et_4W22XJEkrU4jxN9iL6WaStF])
> fails with
> {noformat}
> [Static type checking] - Cannot return value of type java.util.List<#E> for 
> method returning java.lang.Class<? extends java.lang.Throwable>[]
>  @ line 4, column 59.
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to