diff options
author | Paul Phillips <paulp@improving.org> | 2010-06-08 02:15:50 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-06-08 02:15:50 +0000 |
commit | a1e29d20aa7b49caf07e7992287eb0ba8208558a (patch) | |
tree | fb1679e4a3e2c04d6b979d824900688e7e9ec920 /test/files | |
parent | caa6bf0e7a9c02b7519549c289f7a455bad281b1 (diff) | |
download | scala-a1e29d20aa7b49caf07e7992287eb0ba8208558a.tar.gz scala-a1e29d20aa7b49caf07e7992287eb0ba8208558a.tar.bz2 scala-a1e29d20aa7b49caf07e7992287eb0ba8208558a.zip |
Taking another shot at negative constants as an...
Taking another shot at negative constants as annotation arguments since
r22175 didn't quite get there. I call into the constant folder with the
unfolded tree at the last point before it's going to fail the compile
anyway. Closes #3521, review by odersky.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/pos/bug3521/DoubleValue.java | 7 | ||||
-rw-r--r-- | test/files/pos/bug3521/a.scala | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/test/files/pos/bug3521/DoubleValue.java b/test/files/pos/bug3521/DoubleValue.java new file mode 100644 index 0000000000..e8c093890b --- /dev/null +++ b/test/files/pos/bug3521/DoubleValue.java @@ -0,0 +1,7 @@ +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface DoubleValue { + double value(); +}
\ No newline at end of file diff --git a/test/files/pos/bug3521/a.scala b/test/files/pos/bug3521/a.scala new file mode 100644 index 0000000000..94bb451fc3 --- /dev/null +++ b/test/files/pos/bug3521/a.scala @@ -0,0 +1,4 @@ +class Test { + @DoubleValue(-0.05) + var a = 0 +}
\ No newline at end of file |