-
-
Notifications
You must be signed in to change notification settings - Fork 374
Closed
Milestone
Description
It looks like the imported auto-derivation takes precedence over explicitly defined instances available in scope when Option is involved.
Reproducer:
case class Person(
id: Int,
name: String,
address: Option[Address]
)
case class Address(
city: String,
street: String,
zip: Int
)
trait Codecs {
import doobie._
// Ignore the correctness
implicit val addressGet: Get[Address] =
Get[String].map(_ => Address("", "", 1))
}
import doobie._
import doobie.implicits._
object Dao extends Codecs {
val autoderived: Read[Person] = Read[Person]
}
assert(Dao.autoderived.length == 3)
// Dao.autoderived.length is 5
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels