File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
main/scala-2.13/com/avsystem/commons/mongo/typed
test/scala-2.13/com/avsystem/commons/mongo/typed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,12 @@ trait MongoPolyAdtInstances[D[_]] {
1212 def codec [T : GenCodec ]: GenObjectCodec [D [T ]]
1313
1414 /**
15- * We need to accept an implicit `GenObjectCodec[D[T]]` because materialization of
16- * [[MongoAdtFormat ]] requires it ([[MongoAdtFormat.codec ]]). In practice, it can be derived
17- * from the `MongoFormat[T]` that is already accepted by this method but we don't want to do this in this
18- * trait to avoid problems with priorities of implicits. Because of that, this implicit is actually constructed
19- * by [[AbstractMongoPolyDataCompanion.format ]].
15+ * We need to accept an implicit `GenCodec[T]` because materialization of
16+ * [[MongoAdtFormat ]] requires a [[GenObjectCodec ]] ([[MongoAdtFormat.codec ]]). In practice, it can be derived
17+ * from the `MongoFormat[T]` that is already accepted by this method but we have to be careful about priority of
18+ * implicits. Because of that, this implicit is actually provided by [[AbstractMongoPolyDataCompanion.format ]].
2019 */
21- def format [T : MongoFormat ]( implicit codec : GenObjectCodec [ D [ T ]]) : MongoAdtFormat [D [T ]]
20+ def format [T : MongoFormat : GenCodec ] : MongoAdtFormat [D [T ]]
2221}
2322
2423abstract class AbstractMongoPolyDataCompanion [Implicits , D [_]](implicits : Implicits )(
Original file line number Diff line number Diff line change @@ -19,5 +19,5 @@ abstract class CustomPolyDataCompanion[D[_]](
1919 * This class tests (through its compilation) if implicit resolution conflicts that were
2020 * previously present in [[MongoPolyAdtInstances ]] are fixed.
2121 */
22- case class PolyDataWithCustomImplicits [+ T ](wrappy : CustomWrappy , value : T )
22+ case class PolyDataWithCustomImplicits [+ T ](wrappy : CustomWrappy , value : List [ T ] )
2323object PolyDataWithCustomImplicits extends CustomPolyDataCompanion [PolyDataWithCustomImplicits ]
You can’t perform that action at this time.
0 commit comments