From 56e45fa1398c866a378f31c5563fe8f03ecd9100 Mon Sep 17 00:00:00 2001 From: Scala Steward <43047562+scala-steward@users.noreply.github.com> Date: Fri, 1 Nov 2024 12:25:07 +0100 Subject: [PATCH] scala3-compiler, scala3-library 3.5.2 (was 3.4.3) (#618) --- core/src/main/scala-3/anorm/Macro.scala | 14 +++++++++++--- project/Common.scala | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/core/src/main/scala-3/anorm/Macro.scala b/core/src/main/scala-3/anorm/Macro.scala index 44cef825..14362b67 100644 --- a/core/src/main/scala-3/anorm/Macro.scala +++ b/core/src/main/scala-3/anorm/Macro.scala @@ -368,12 +368,16 @@ object Macro extends MacroOptions with macros.ValueColumn with macros.ValueToSta ): Expr[RowParser[T]] = macros.SealedRowParserImpl[T](naming, discriminate) - inline private def withParser[T](f: RowParser[T] => (Row => SqlResult[T])): RowParser[T] = new RowParser[T] { self => + final class SelfRowParser[T]( + f: RowParser[T] => (Row => SqlResult[T]) + ) extends RowParser[T] { self => lazy val underlying = f(self) def apply(row: Row): SqlResult[T] = underlying(row) } + inline private def withParser[T](f: RowParser[T] => (Row => SqlResult[T])): RowParser[T] = new SelfRowParser[T](f) + /** * @tparam T the field type */ @@ -544,14 +548,18 @@ object Macro extends MacroOptions with macros.ValueColumn with macros.ValueToSta } } - inline private def withSelfToParameterList[T]( + final class SelfToParameterList[T]( f: ToParameterList[T] => (T => List[NamedParameter]) - ): ToParameterList[T] = new ToParameterList[T] { self => + ) extends ToParameterList[T] { self => lazy val underlying = f(self) def apply(input: T): List[NamedParameter] = underlying(input) } + inline private def withSelfToParameterList[T]( + f: ToParameterList[T] => (T => List[NamedParameter]) + ): ToParameterList[T] = new SelfToParameterList[T](f) + /** Only for internal purposes */ final class Placeholder {} diff --git a/project/Common.scala b/project/Common.scala index d2c25e9e..8f4ffd20 100644 --- a/project/Common.scala +++ b/project/Common.scala @@ -21,7 +21,7 @@ object Common extends AutoPlugin { organization := "org.playframework.anorm", sonatypeProfileName := "org.playframework", scalaVersion := "2.12.20", - crossScalaVersions := Seq("2.11.12", scalaVersion.value, "2.13.15", "3.4.3"), + crossScalaVersions := Seq("2.11.12", scalaVersion.value, "2.13.15", "3.5.2"), Compile / unmanagedSourceDirectories ++= { val sv = scalaVersion.value