summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-06-08 12:11:51 -0700
committerPaul Phillips <paulp@improving.org>2013-06-08 12:11:51 -0700
commita9972cc7e851882b5e0b4d6d97ad951b012167c0 (patch)
tree4b4eb0ebdf4b9d61ff833d26c545a631508bd871 /test/files
parentcb9edc9736d8fe27c8c8bf5fefbd64f163a1c596 (diff)
parent608f577e0a565c746f94b9b52ceadf9728b179b4 (diff)
downloadscala-a9972cc7e851882b5e0b4d6d97ad951b012167c0.tar.gz
scala-a9972cc7e851882b5e0b4d6d97ad951b012167c0.tar.bz2
scala-a9972cc7e851882b5e0b4d6d97ad951b012167c0.zip
Merge pull request #2611 from retronym/ticket/6481
SI-6841 Fix bug at the intersection of DelayedInit and named args
Diffstat (limited to 'test/files')
-rw-r--r--test/files/run/t6481.check4
-rw-r--r--test/files/run/t6481.scala13
2 files changed, 17 insertions, 0 deletions
diff --git a/test/files/run/t6481.check b/test/files/run/t6481.check
new file mode 100644
index 0000000000..7ec29631b1
--- /dev/null
+++ b/test/files/run/t6481.check
@@ -0,0 +1,4 @@
+delayed init
+new foo(1, 2)
+delayed init
+new foo(b = 2, a = 1)
diff --git a/test/files/run/t6481.scala b/test/files/run/t6481.scala
new file mode 100644
index 0000000000..125da3b15a
--- /dev/null
+++ b/test/files/run/t6481.scala
@@ -0,0 +1,13 @@
+abstract class foo(a: Int, b: Int) extends scala.DelayedInit {
+ def delayedInit(x: => Unit) {
+ println("delayed init");
+ x
+ }
+}
+
+object Test {
+ def main(args: Array[String]) {
+ new foo(1, 2) { println("new foo(1, 2)") }
+ new foo(b = 2, a = 1) { println("new foo(b = 2, a = 1)") }
+ }
+}