Skip to content

Commit a721b73

Browse files
committed
Elide message def binding if not used
This also reduces sligttly the size of the if it is used.
1 parent 68e2023 commit a721b73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/src/dotty/DottyPredef.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ package dotty
33
object DottyPredef {
44
import compiletime.summonFrom
55

6-
inline final def assert(assertion: => Boolean, message: => Any): Unit = {
6+
inline final def assert(inline assertion: Boolean, inline message: => Any): Unit = {
77
if (!assertion)
88
assertFail(message)
99
}
1010

11-
inline final def assert(inline assertion: => Boolean) <: Unit = {
11+
inline final def assert(inline assertion: Boolean): Unit = {
1212
if (!assertion)
1313
assertFail()
1414
}

0 commit comments

Comments
 (0)