diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-03-11 22:55:36 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-03-11 22:55:36 -0700 |
commit | d168c7d8844830987f24325b608625153a0cfa7c (patch) | |
tree | 30360226a8b474644abd63661891ea92911f3bd6 /test/files/pos/t7234b.scala | |
parent | 8b7db17d78aee2dadb904e0039390960dda6e56d (diff) | |
parent | 83c9c764b528a7a1c1d39c480d22c8e3a71d5a58 (diff) | |
download | scala-d168c7d8844830987f24325b608625153a0cfa7c.tar.gz scala-d168c7d8844830987f24325b608625153a0cfa7c.tar.bz2 scala-d168c7d8844830987f24325b608625153a0cfa7c.zip |
Merge pull request #2225 from retronym/ticket/7234
SI-7234 Make named args play nice with dep. method types
Diffstat (limited to 'test/files/pos/t7234b.scala')
-rw-r--r-- | test/files/pos/t7234b.scala | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/files/pos/t7234b.scala b/test/files/pos/t7234b.scala new file mode 100644 index 0000000000..fee98e87a8 --- /dev/null +++ b/test/files/pos/t7234b.scala @@ -0,0 +1,20 @@ +trait Main { + trait A { + type B + def b: B + } + trait C { + def c(a: A, x: Int = 0)(b: => a.B, bs: a.B*) + def d(a: A = null, x: Int = 0)(b1: => a.B = a.b, b2: a.B = a.b) + } + def c: C + def ok(a: A)(b: a.B) = c.c(a, 42)(b) + def fail(a: A)(b: a.B) = c.c(a)(b) + def fail2(a: A)(b: a.B) = c.c(a)(b, b) + def fail3(a: A)(b: a.B) = c.c(a)(b, Seq[a.B](b): _*) + + def fail4(a: A)(b: a.B) = c.d(a)() + def fail5(a: A)(b: a.B) = c.d(a)(b1 = a.b) + def fail6(a: A)(b: a.B) = c.d(a)(b2 = a.b) + def fail7(a: A)(b: a.B) = c.d()() +} |