aboutsummaryrefslogtreecommitdiff
path: root/tests/pending
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-01-18 11:52:37 +0100
committerMartin Odersky <odersky@gmail.com>2016-02-19 14:00:01 +0100
commit103339ed48f95b427776f18cf4659afb2f84897c (patch)
tree644284ccb44e5c7de57981eb616b42fc348ca565 /tests/pending
parentd0b1ebcd41674dd78ec98a88ce4a60457c423da0 (diff)
downloaddotty-103339ed48f95b427776f18cf4659afb2f84897c.tar.gz
dotty-103339ed48f95b427776f18cf4659afb2f84897c.tar.bz2
dotty-103339ed48f95b427776f18cf4659afb2f84897c.zip
Add test to illustrate overloading problem.
Diffstat (limited to 'tests/pending')
-rw-r--r--tests/pending/pos/overloaddefault.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/pending/pos/overloaddefault.scala b/tests/pending/pos/overloaddefault.scala
new file mode 100644
index 000000000..ed539719d
--- /dev/null
+++ b/tests/pending/pos/overloaddefault.scala
@@ -0,0 +1,15 @@
+trait Scope
+class MScope extends Scope
+
+case class CI(pre: Int, decls: Scope) {
+ def derivedCI(pre: Int) = new CI(pre, decls)
+ def derivedCI(pre: Int = this.pre, decls: Scope = this.decls) = new CI(pre, decls)
+}
+
+object Test {
+ def ci = new CI(1, new MScope)
+ val decls1 = new MScope
+ ci.derivedCI(2, decls = decls1)
+ ci.derivedCI(pre = 2)
+ ci.derivedCI(decls = decls1)
+}