Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Consider the following:
@interface A { int i1() default (int) 42 int i2() default 42 as int byte b1() default (byte) 42 byte b2() default 42 as byte char c1() default (char) 42 char c2() default 42 as char long l1() default (long) 42 long l2() default 42 as long short s1() default (short) 42 short s2() default 42 as short float f1() default (float) 42 float f2() default 42 as float double d1() default (double) 42 double d2() default 42 as double } print A.getMethod('i1').defaultValue​
Long, Float and Double defaults cannot currently be specified in this manner.
See also GROOVY-6025
Attachments
Issue Links
- relates to
-
GROOVY-6025 Using short, byte, char annotation definition attribute constants should be supported
- Closed
-
GROOVY-7252 Integer literal not accepted for primitive short annotation attribute
- Closed
-
GROOVY-9206 Cannot use annotation with attribute of type char
- Closed
-
GROOVY-9366 Unable represent literal byte costant
- Closed
-
GROOVY-10068 Cannot compile when set short value to annotation by already defined short variable since version 2.5.4
- Closed