summaryrefslogtreecommitdiff
path: root/test/files/run/t3236/ByteAnnotation.java
diff options
context:
space:
mode:
authorJohannes Rudolph <johannes.rudolph@gmail.com>2016-03-08 23:02:23 +0100
committerLukas Rytz <lukas.rytz@gmail.com>2016-10-28 16:56:57 +0200
commit81d2c6185e6c10defcf1f6a25f69e8b2ed025d86 (patch)
treed1a69af725a9bd7944e3edd159bebf89ab4d7954 /test/files/run/t3236/ByteAnnotation.java
parentb9a16c4a812a0bde8bd23fb90c0ec5d9439e0e14 (diff)
downloadscala-81d2c6185e6c10defcf1f6a25f69e8b2ed025d86.tar.gz
scala-81d2c6185e6c10defcf1f6a25f69e8b2ed025d86.tar.bz2
scala-81d2c6185e6c10defcf1f6a25f69e8b2ed025d86.zip
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.
Diffstat (limited to 'test/files/run/t3236/ByteAnnotation.java')
-rw-r--r--test/files/run/t3236/ByteAnnotation.java7
1 files changed, 7 insertions, 0 deletions
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();
+}