summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-07-26 10:16:29 -0700
committerPaul Phillips <paulp@improving.org>2013-01-30 03:50:19 -0800
commit09908906862bff6fb6180469d7979abce1bb2bfc (patch)
tree9a2da346a316f8c572c5f2b0cd3cf483069f5685 /test/files/run
parent7026376dcc87f531de84c99aa3e52068f5b10874 (diff)
downloadscala-09908906862bff6fb6180469d7979abce1bb2bfc.tar.gz
scala-09908906862bff6fb6180469d7979abce1bb2bfc.tar.bz2
scala-09908906862bff6fb6180469d7979abce1bb2bfc.zip
SI-2418, remove restriction on final vars.
[backport] The original fix for SI-2418 excluded final vars entirely, but the problem was not final vars per se, but the emission of ACC_FINAL in combination with ACC_VOLATILE. Since vars never get ACC_FINAL now, this is no longer an issue.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t2418.check1
-rw-r--r--test/files/run/t2418.scala10
2 files changed, 11 insertions, 0 deletions
diff --git a/test/files/run/t2418.check b/test/files/run/t2418.check
new file mode 100644
index 0000000000..f599e28b8a
--- /dev/null
+++ b/test/files/run/t2418.check
@@ -0,0 +1 @@
+10
diff --git a/test/files/run/t2418.scala b/test/files/run/t2418.scala
new file mode 100644
index 0000000000..f330bef60a
--- /dev/null
+++ b/test/files/run/t2418.scala
@@ -0,0 +1,10 @@
+class Foo {
+ @volatile final var x=10
+ override def toString = "" + x
+}
+
+object Test {
+ def main(args: Array[String]): Unit = {
+ println((new Foo))
+ }
+}