From 09908906862bff6fb6180469d7979abce1bb2bfc Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Thu, 26 Jul 2012 10:16:29 -0700 Subject: 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. --- test/files/run/t2418.check | 1 + test/files/run/t2418.scala | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 test/files/run/t2418.check create mode 100644 test/files/run/t2418.scala (limited to 'test/files/run') 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)) + } +} -- cgit v1.2.3