Skip to content

Commit

Permalink
Fix null issues with tests
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Dec 12, 2024
1 parent 670e642 commit e08d131
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/tests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ object Readable extends Derivation[Readable]:
given boolean: Readable[Boolean] = _ == "yes".tt

inline def join[DerivationType <: Product: ProductReflection]: Readable[DerivationType] = text =>
IArray.from(text.s.split(",")).pipe: array =>
IArray.from(text.s.split(",").nn.map(_.nn)).pipe: array =>
construct: [FieldType] =>
readable =>
if index < array.length then readable.read(array(index).tt) else default().or:
???

inline def split[DerivationType: SumReflection]: Readable[DerivationType] = text =>
text.s.split(":").to(List).map(_.tt) match
text.s.split(":").nn.map(_.nn).to(List).map(_.tt) match
case List(variant, text2) => delegate(variant): [VariantType <: DerivationType] =>
context => context.read(text2)

Expand Down Expand Up @@ -227,4 +227,4 @@ def main(): Unit =
val showForSimple = summon[Show[Simple]]
println(showForSimple.show(Simple.Second))
// TODO: remove or adjust
val compilationError = summon[Show[Adt]]
//val compilationError = summon[Show[Adt]]

0 comments on commit e08d131

Please sign in to comment.