From c854cc7fcc9d0f889c6235c1534133cff7360e7f Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 17 Mar 2014 18:44:39 +0100 Subject: More tests --- tests/pos/t1185.scala | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/pos/t1185.scala (limited to 'tests/pos/t1185.scala') diff --git a/tests/pos/t1185.scala b/tests/pos/t1185.scala new file mode 100644 index 000000000..fa863d158 --- /dev/null +++ b/tests/pos/t1185.scala @@ -0,0 +1,15 @@ +class Test { + private[this] var member = 0; + def foo() = { + (() => member=1)() + } + def look=member +} + +object Main{ + def main(args : Array[String]): Unit = { + val fff=new Test() + fff.foo() + assert(1==fff.look) + } +} -- cgit v1.2.3