summaryrefslogtreecommitdiff
path: root/test/pending/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/pending/run')
-rw-r--r--test/pending/run/t6387.check1
-rw-r--r--test/pending/run/t6387.scala16
2 files changed, 17 insertions, 0 deletions
diff --git a/test/pending/run/t6387.check b/test/pending/run/t6387.check
new file mode 100644
index 0000000000..83b33d238d
--- /dev/null
+++ b/test/pending/run/t6387.check
@@ -0,0 +1 @@
+1000
diff --git a/test/pending/run/t6387.scala b/test/pending/run/t6387.scala
new file mode 100644
index 0000000000..bbebb5f511
--- /dev/null
+++ b/test/pending/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)
+ }
+}