summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-03-27 10:35:01 -0700
committerPaul Phillips <paulp@improving.org>2013-03-27 10:35:01 -0700
commit9e1483d4d32a644cf17ebe7bcf41b27e9a3c3160 (patch)
treebda59d947bb2e6ef44d3b2ee98c3b73a81289167 /test/files
parentf0b866e78fc07fe2dd5f38be74d8cba7816867a3 (diff)
parent4e10b2c833fa846c68b81e94a08d867e7de656aa (diff)
downloadscala-9e1483d4d32a644cf17ebe7bcf41b27e9a3c3160.tar.gz
scala-9e1483d4d32a644cf17ebe7bcf41b27e9a3c3160.tar.bz2
scala-9e1483d4d32a644cf17ebe7bcf41b27e9a3c3160.zip
Merge pull request #2288 from paulp/pr/2273-with-edits
SI-6387 Clones accessor before name expansion
Diffstat (limited to 'test/files')
-rw-r--r--test/files/run/t6387.check1
-rw-r--r--test/files/run/t6387.scala16
2 files changed, 17 insertions, 0 deletions
diff --git a/test/files/run/t6387.check b/test/files/run/t6387.check
new file mode 100644
index 0000000000..83b33d238d
--- /dev/null
+++ b/test/files/run/t6387.check
@@ -0,0 +1 @@
+1000
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)
+ }
+}