From 81d2c6185e6c10defcf1f6a25f69e8b2ed025d86 Mon Sep 17 00:00:00 2001 From: Johannes Rudolph Date: Tue, 8 Mar 2016 23:02:23 +0100 Subject: SI-3236 constant types for literal final static java fields Since we don't parse Java expressions, fields of Java classes coming from source files never have constant types. This prevents using static java fields in annotation arguments in mixed compilation This PR assigns constant types to final static java fields if the initializer is a simple literal. --- test/files/run/t3236/ByteAnnotation.java | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/files/run/t3236/ByteAnnotation.java (limited to 'test/files/run/t3236/ByteAnnotation.java') diff --git a/test/files/run/t3236/ByteAnnotation.java b/test/files/run/t3236/ByteAnnotation.java new file mode 100644 index 0000000000..c986fa5d27 --- /dev/null +++ b/test/files/run/t3236/ByteAnnotation.java @@ -0,0 +1,7 @@ +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) +public @interface ByteAnnotation { + byte value(); +} -- cgit v1.2.3