summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-06-08 02:15:50 +0000
committerPaul Phillips <paulp@improving.org>2010-06-08 02:15:50 +0000
commita1e29d20aa7b49caf07e7992287eb0ba8208558a (patch)
treefb1679e4a3e2c04d6b979d824900688e7e9ec920 /test
parentcaa6bf0e7a9c02b7519549c289f7a455bad281b1 (diff)
downloadscala-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')
-rw-r--r--test/files/pos/bug3521/DoubleValue.java7
-rw-r--r--test/files/pos/bug3521/a.scala4
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