Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scala-compiler, scala-library, ... to 2.13.13 #1259

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions macros/shared/src/main/scala-2/zio/prelude/Macros.scala
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,17 @@ private[prelude] class Macros(val c: whitebox.Context) extends Liftables {
quotedAssertion match {
case Some(quotedAssertion) =>
expr.tree match {
case Literal(Constant(value)) =>
Copy link
Member

@guizmaii guizmaii Apr 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove a new warning message generated by Scala 2.13.13:

[error] /home/runner/work/zio-prelude/zio-prelude/macros/shared/src/main/scala-2/zio/prelude/Macros.scala:103:33: Name value is already introduced in an enclosing scope as value value at line 94. Did you intend to match it using backquoted `value`?
[error]           case Literal(Constant(value)) =>

case Literal(Constant(value0)) =>
val (assertion, code) = getAssertion[T, A](quotedAssertion)

assertion.apply(value.asInstanceOf[A]) match {
assertion.apply(value0.asInstanceOf[A]) match {
case Left(error) =>
val message =
s"""
|$assertionErrorHeader
|${"\u001b[2m"}assertion = ${Console.RESET + Console.YELLOW}$code${Console.RESET}
|
|${error.render(value.toString)}
|${error.render(value0.toString)}
|""".stripMargin

c.abort(c.enclosingPosition, message)
Expand Down
2 changes: 1 addition & 1 deletion project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import scalafix.sbt.ScalafixPlugin.autoImport.*

object BuildHelper {
val Scala212: String = "2.12.19"
val Scala213: String = "2.13.12"
val Scala213: String = "2.13.13"
val Scala3: String = "3.3.3"

private val stdOptions = Seq(
Expand Down
Loading