Skip to content

Commit

Permalink
Fat finger fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Primetalk committed Apr 16, 2024
1 parent a2f11a1 commit c81a9ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ object GenericDecoder {
// they will be the constructor and/or any other field-decoders:
// List((new Name(Decoder("Joe") || Decoder("Bloggs")), Decoder(123))
// This is what needs to be fed into the constructor of the outer-entity i.e.
// new Person((new Name(Decoder("Joe") || Decoder("Bloggs")), DecodConstructDecodeder(123))
// new Person((new Name(Decoder("Joe") || Decoder("Bloggs")), Decoder(123))
val productElements = flattenData.map(_.decodedExpr)
// actually doing the construction i.e. `new Person(...)`
val constructed = ConstructDecoded[T](types, productElements, m)
Expand Down Expand Up @@ -381,6 +381,7 @@ object ConstructDecoded {
'{EmptyTuple}
} else if (tpe <:< TypeRepr.of[Tuple]) {
'{scala.runtime.Tuples.fromIArray(IArray(${Varargs(terms)})).asInstanceOf[T]}
// Alternative version:
// val t =
// Varargs
// Type.of[T] match {
Expand Down
1 change: 0 additions & 1 deletion quill-sql/src/main/scala/io/getquill/quat/QuatMaking.scala
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ trait QuatMakingBase {
case ArbitraryArityTupleType(tupleParts) =>
Quat.Product("Tuple", tupleParts.zipWithIndex.map { case (fieldType, idx) => (s"_${idx + 1}", parseType(fieldType)) })

//Quat.Product
// If we are already inside a bounded type, treat an arbitrary type as a interface list
case ArbitraryBaseType(name, fields) if (boundedInterfaceType) =>
Quat.Product(name, fields.map { case (fieldName, fieldType) => (fieldName, parseType(fieldType)) })
Expand Down

0 comments on commit c81a9ea

Please sign in to comment.