File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,13 @@ object DottyPredef {
88 assertFail(message)
99 }
1010
11- inline final def assert (assertion : => Boolean ): Unit = {
11+ inline final def assert (assertion : => Boolean ) < : Unit = {
1212 if (! assertion)
1313 assertFail()
1414 }
1515
16- def assertFail (): Unit = throw new java.lang.AssertionError (" assertion failed" )
17- def assertFail (message : => Any ): Unit = throw new java.lang.AssertionError (" assertion failed: " + message)
16+ def assertFail (): Nothing = throw new java.lang.AssertionError (" assertion failed" )
17+ def assertFail (message : => Any ): Nothing = throw new java.lang.AssertionError (" assertion failed: " + message)
1818
1919 inline final def implicitly [T ](implicit ev : T ): T = ev
2020
Original file line number Diff line number Diff line change @@ -39,5 +39,5 @@ def test: Unit =
3939 if ! (x3 != null ) then throw AssertionError ()
4040 if x3 == null then impossible(new T {})
4141
42- // assert(x4 != null)
43- // if x4 == null then impossible(new T{})
42+ assert(x4 != null )
43+ if x4 == null then impossible(new T {})
You can’t perform that action at this time.
0 commit comments