Description
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
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