File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ object NoClashNoSig {
20
20
case class NoClashNoSig private (x : Int )
21
21
22
22
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)
24
24
25
25
def apply (x : String ): NoClashOverload = ???
26
26
}
@@ -33,7 +33,7 @@ class BaseNCNSP[T] {
33
33
}
34
34
35
35
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
37
37
38
38
39
39
You can’t perform that action at this time.
0 commit comments