summaryrefslogtreecommitdiff
path: root/test/files/pos/bug1185.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/bug1185.scala')
-rw-r--r--test/files/pos/bug1185.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/pos/bug1185.scala b/test/files/pos/bug1185.scala
new file mode 100644
index 0000000000..de453ec8dd
--- /dev/null
+++ b/test/files/pos/bug1185.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]){
+ val fff=new Test()
+ fff.foo()
+ assert(1==fff.look)
+ }
+}