File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ object Deriving {
5757 def fromProduct (p : scala.Product ): T
5858 }
5959
60- class Singleton [T ] extends Generic [T ] {
60+ trait Singleton [T ] extends Generic [T ] {
6161 inline def singletonValue = implicit match {
6262 case ev : ValueOf [T ] => ev.value
6363 }
@@ -105,11 +105,9 @@ object Lst {
105105 implicit def GenericCons [T ]: GenericCons [T ] = new GenericCons [T ]
106106 }
107107
108- case object Nil extends Lst [Nothing ] {
109- class GenericNil extends Generic .Singleton [Nil .type ] {
110- type CaseLabel = " Nil"
111- }
112- implicit def GenericNil : GenericNil = new GenericNil
108+ case object Nil extends Lst [Nothing ] with Generic .Singleton [Nil .type ] {
109+ type CaseLabel = " Nil"
110+ implicit def GenericNil : Nil .type = this
113111 }
114112
115113 // three clauses that would be generated from a `derives` clause
You can’t perform that action at this time.
0 commit comments