summaryrefslogtreecommitdiff
path: root/test/files/run/t2418.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-07-26 10:16:29 -0700
committerPaul Phillips <paulp@improving.org>2012-07-26 10:19:41 -0700
commitb79c7600544db9964c228b94a2f70f3ed854f89b (patch)
tree4311fe4c11416e919892d06ae568352e6ad24d0a /test/files/run/t2418.scala
parentfe513d1f147e60988414b01e5928811bb6f78714 (diff)
downloadscala-b79c7600544db9964c228b94a2f70f3ed854f89b.tar.gz
scala-b79c7600544db9964c228b94a2f70f3ed854f89b.tar.bz2
scala-b79c7600544db9964c228b94a2f70f3ed854f89b.zip
Removed restriction on final vars, SI-2418.
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/t2418.scala')
-rw-r--r--test/files/run/t2418.scala10
1 files changed, 10 insertions, 0 deletions
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))
+ }
+}