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 20425bb commit 02141bfCopy full SHA for 02141bf
library/src/dotty/DottyPredef.scala
@@ -24,4 +24,18 @@ object DottyPredef {
24
* `discardForView` from two to one.
25
*/
26
abstract class ImplicitConverter[-T, +U] extends Function1[T, U]
27
+
28
+ @inline final def assert(assertion: Boolean, message: => Any): Unit = {
29
+ if (!assertion)
30
+ assertFail(message)
31
+ }
32
33
+ @inline final def assert(assertion: Boolean): Unit = {
34
35
+ assertFail()
36
37
38
+ final def assertFail(): Unit = throw new java.lang.AssertionError("assertion failed")
39
+ final def assertFail(message: => Any): Unit = throw new java.lang.AssertionError("assertion failed: " + message)
40
41
}
0 commit comments