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 {
2020case class NoClashNoSig private (x : Int )
2121
2222object 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
3535object 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
You can’t perform that action at this time.
0 commit comments