Skip to content

Commit

Permalink
scala3-compiler, scala3-library 3.5.2 (was 3.4.3) (#618)
Browse files Browse the repository at this point in the history
  • Loading branch information
scala-steward authored Nov 1, 2024
1 parent 3dd6a39 commit 56e45fa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions core/src/main/scala-3/anorm/Macro.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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 {}

Expand Down
2 changes: 1 addition & 1 deletion project/Common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 56e45fa

Please sign in to comment.