summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-01-31 20:04:51 -0800
committerPaul Phillips <paulp@improving.org>2013-01-31 20:04:51 -0800
commitb573c287d2eb47cd06f27197c650ed49faa8ca20 (patch)
tree0dcdf429fd84a03ce174017535f14997fdd690e4 /test/files/run
parent08596af059edd3f2343764ba6cd022d65ace5921 (diff)
parent243cedecda536d2d49fd64a19a9862fd26fe07f6 (diff)
downloadscala-b573c287d2eb47cd06f27197c650ed49faa8ca20.tar.gz
scala-b573c287d2eb47cd06f27197c650ed49faa8ca20.tar.bz2
scala-b573c287d2eb47cd06f27197c650ed49faa8ca20.zip
Merge pull request #2037 from JamesIry/2.10.x_SI-2418
[backport] Removed restriction on final vars, SI-2418.
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))
+ }
+}