You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (JIRA)" <ji...@apache.org> on 2019/04/25 20:24:00 UTC

[jira] [Created] (GROOVY-9096) Repeatable annotation not wrapped with container type in class file

Eric Milles created GROOVY-9096:
-----------------------------------

             Summary: 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


Consider the following:
Anno.java
{code:java}
import java.lang.annotation.*;

@Retention(RetentionPolicy.CLASS)
@Repeatable(Annos.class)
@interface Anno {
  String value() default "";
}

@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)