diff options
Diffstat (limited to 'test/files/run/t6387.scala')
-rw-r--r-- | test/files/run/t6387.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/t6387.scala b/test/files/run/t6387.scala new file mode 100644 index 0000000000..bbebb5f511 --- /dev/null +++ b/test/files/run/t6387.scala @@ -0,0 +1,16 @@ +trait A { + def foo: Long +} + +object Test { + def a(): A = new A { + var foo: Long = 1000L + + val test = () => { + foo = 28 + } + } + def main(args: Array[String]) { + println(a().foo) + } +} |