File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ object Deriving {
57
57
def fromProduct (p : scala.Product ): T
58
58
}
59
59
60
- class Singleton [T ] extends Generic [T ] {
60
+ trait Singleton [T ] extends Generic [T ] {
61
61
inline def singletonValue = implicit match {
62
62
case ev : ValueOf [T ] => ev.value
63
63
}
@@ -105,11 +105,9 @@ object Lst {
105
105
implicit def GenericCons [T ]: GenericCons [T ] = new GenericCons [T ]
106
106
}
107
107
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
113
111
}
114
112
115
113
// three clauses that would be generated from a `derives` clause
You can’t perform that action at this time.
0 commit comments