Skip to content

Commit c26f319

Browse files
committed
Fix test
1 parent 476c93e commit c26f319

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/neg/i4564.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ object NoClashNoSig {
2020
case class NoClashNoSig private(x: Int)
2121

2222
object NoClashOverload {
23-
private def apply(x: Boolean) = if (x) NoClashOverload(1) else apply("") // error: overloaded method apply needs result type
23+
private def apply(x: Boolean) = if (x) NoClashOverload(1) else apply("") // error // error: overloaded method apply needs result type (twice)
2424

2525
def apply(x: String): NoClashOverload = ???
2626
}
@@ -33,7 +33,7 @@ class BaseNCNSP[T] {
3333
}
3434

3535
object NoClashNoSigPoly extends BaseNCNSP[Boolean]
36-
case class NoClashNoSigPoly private(x: Int) // error: recursive method apply needs result type
36+
case class NoClashNoSigPoly private(x: Int) // ok, since `apply` is in base class
3737

3838

3939

0 commit comments

Comments
 (0)