TreeMaker.AnnotationBuilder creates broken element literals with repeating annotations

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 8
    • Affects Version/s: 8
    • Component/s: tools
    • None
    • Environment:

      jdk8 b99 windows

    • b103
    • Verified

      Given the following test case:

      import java.lang.annotation.*;

      @Anno(req = true)
      @Anno()
      public class CannotCompileRepeatedAnnoTest {
      }

      @Repeatable(Container.class)
      @interface Anno {
          boolean req() default false;
      }

      @interface Container{
          Anno[] value();
      }

      If it's compiled with javac:
      $ javac CannotCompileRepeatedAnnoTest.java

      javac generates the following error:

      CannotCompileRepeatedAnnoTest.java:34: error: incompatible types: int cannot be converted to boolean
      @Anno(req = true)
      ^
      1 error

            Assignee:
            Vicente Arturo Romero Zaldivar
            Reporter:
            Andrey Nazarov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: