diff options
Diffstat (limited to 'test/files/run/local_obj.scala')
-rw-r--r-- | test/files/run/local_obj.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/run/local_obj.scala b/test/files/run/local_obj.scala new file mode 100644 index 0000000000..25123f7078 --- /dev/null +++ b/test/files/run/local_obj.scala @@ -0,0 +1,9 @@ +class C { + val z = 2 + def mod = { object x { val y = z } ; x.y } +} + +object Test extends App { + val c = new C + assert(c.mod == c.z, s"${c.mod} != ${c.z}") +} |