From c81a9eac4b9084e5eeb662e802a3900fbef3228d Mon Sep 17 00:00:00 2001 From: Arseniy Zhizhelev Date: Tue, 16 Apr 2024 09:20:45 +0300 Subject: [PATCH] Fat finger fix --- .../src/main/scala/io/getquill/generic/GenericDecoder.scala | 3 ++- quill-sql/src/main/scala/io/getquill/quat/QuatMaking.scala | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/quill-sql/src/main/scala/io/getquill/generic/GenericDecoder.scala b/quill-sql/src/main/scala/io/getquill/generic/GenericDecoder.scala index 835d67f6..6a625c0c 100644 --- a/quill-sql/src/main/scala/io/getquill/generic/GenericDecoder.scala +++ b/quill-sql/src/main/scala/io/getquill/generic/GenericDecoder.scala @@ -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) @@ -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 { diff --git a/quill-sql/src/main/scala/io/getquill/quat/QuatMaking.scala b/quill-sql/src/main/scala/io/getquill/quat/QuatMaking.scala index a88f3bc5..bdda1183 100644 --- a/quill-sql/src/main/scala/io/getquill/quat/QuatMaking.scala +++ b/quill-sql/src/main/scala/io/getquill/quat/QuatMaking.scala @@ -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)) })