Skip to content

Commit

Permalink
Remove lazy modifier from Predef.assert
Browse files Browse the repository at this point in the history
Since message is inlined and gated behind the `if` check, it will still only get parsed on demand.
  • Loading branch information
isaacl authored Sep 19, 2024
1 parent ba9e59a commit 1be0755
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/src/scala/runtime/stdLibPatches/Predef.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import scala.annotation.internal.RuntimeChecked
object Predef:
import compiletime.summonFrom

transparent inline def assert(inline assertion: Boolean, inline message: => Any): Unit =
transparent inline def assert(inline assertion: Boolean, inline message: Any): Unit =
if !assertion then scala.runtime.Scala3RunTime.assertFailed(message)

transparent inline def assert(inline assertion: Boolean): Unit =
Expand Down

0 comments on commit 1be0755

Please sign in to comment.