aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/overloaddefault.scala
blob: ed539719df443ca851f6b0b26d3d6e046ab8d434 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)
}