We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2844c2b commit 75471fbCopy full SHA for 75471fb
compiler/src/dotty/tools/package.scala
@@ -42,4 +42,11 @@ package object tools {
42
43
def unreachable(x: Any = "<< this case was declared unreachable >>"): Nothing =
44
throw new MatchError(x)
45
+
46
+ transparent inline def assertShort(inline assertion: Boolean, inline message: Any = null): Unit =
47
+ if !assertion then
48
+ val msg = message
49
+ val e = if msg == null then AssertionError() else AssertionError("assertion failed: " + msg)
50
+ e.setStackTrace(Array())
51
+ throw e
52
}
0 commit comments