aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/t1185.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/t1185.scala')
-rw-r--r--tests/untried/pos/t1185.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/untried/pos/t1185.scala b/tests/untried/pos/t1185.scala
new file mode 100644
index 000000000..fa863d158
--- /dev/null
+++ b/tests/untried/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)
+ }
+}