diff options
author | Johannes Rudolph <johannes.rudolph@gmail.com> | 2016-03-08 23:02:23 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2016-10-28 16:56:57 +0200 |
commit | 81d2c6185e6c10defcf1f6a25f69e8b2ed025d86 (patch) | |
tree | d1a69af725a9bd7944e3edd159bebf89ab4d7954 /test/files/run/t3236/DoubleAnnotation.java | |
parent | b9a16c4a812a0bde8bd23fb90c0ec5d9439e0e14 (diff) | |
download | scala-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/DoubleAnnotation.java')
-rw-r--r-- | test/files/run/t3236/DoubleAnnotation.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/run/t3236/DoubleAnnotation.java b/test/files/run/t3236/DoubleAnnotation.java new file mode 100644 index 0000000000..1eb8223f4e --- /dev/null +++ b/test/files/run/t3236/DoubleAnnotation.java @@ -0,0 +1,7 @@ +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) +public @interface DoubleAnnotation { + double value(); +} |