You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2019/05/20 07:32:12 UTC
[jira] [Closed] (GROOVY-9096) Repeatable annotation not wrapped
with container type in class file
[ https://issues.apache.org/jira/browse/GROOVY-9096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-9096.
-----------------------------
> Repeatable annotation not wrapped with container type in class file
> -------------------------------------------------------------------
>
> Key: GROOVY-9096
> URL: https://issues.apache.org/jira/browse/GROOVY-9096
> Project: Groovy
> Issue Type: Bug
> Components: Compiler
> Affects Versions: 2.5.6
> Reporter: Eric Milles
> Assignee: Paul King
> Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
>
> Consider the following:
> Anno.java
> {code:java}
> import java.lang.annotation.*;
> @Retention(RetentionPolicy.CLASS)
> @Repeatable(Annos.class)
> @interface Anno {
> String value() default "";
> }
> @Retention(RetentionPolicy.CLASS)
> @interface Annos {
> Anno[] value();
> }
> {code}
> Pogo.groovy
> {code:groovy}
> @Anno @Anno('x')
> class Pogo {}
> {code}
> When this is compiled, the annotations in the class file are incorrect:
> {code}
> // Compiled from Pogo.groovy (version 1.8 : 52.0, super bit)
> @Anno@pack.Anno(value="x")
> public class Pogo implements groovy.lang.GroovyObject {
> {code}
> vs.
> {code}
> // Compiled from Pojo.java (version 1.8 : 52.0, super bit)
> @Annos(value={@Anno,@Anno(value="x")})
> public class Pojo {
> {code}
> See GROOVY-8234 for initial support for {{@Repeatable}}.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)