object A extends B {
case class SomeEvidenceClass(blablala)
read[SomeEvidenceClass](something)
}
But if SomeEvidenceClass is declared in parent trait B, it won't work...
In other words:
Types#read[T: Reader](expr: String): T
If the T evidence is a case class and it can be read by Generated Tuple Reader, it must be declared in the class that read method is called from. If you declare it for instance in a parent trait, you get :
uPickle does not know how to read SomeEvidenceCaseClass define an implicit Reader[SomeEvidenceCaseClass]
So that this works :
But if
SomeEvidenceClass
is declared in parent trait B, it won't work...In other words:
Types#read[T: Reader](expr: String): T
If the
T
evidence is a case class and it can be read by Generated Tuple Reader, it must be declared in the class thatread
method is called from. If you declare it for instance in a parent trait, you get :uPickle does not know how to read
SomeEvidenceCaseClass
define an implicitReader[SomeEvidenceCaseClass]
ID: 18 Original Author: l15k4