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 {
8
8
assertFail(message)
9
9
}
10
10
11
- inline final def assert (assertion : => Boolean ): Unit = {
11
+ inline final def assert (assertion : => Boolean ) < : Unit = {
12
12
if (! assertion)
13
13
assertFail()
14
14
}
15
15
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)
18
18
19
19
inline final def implicitly [T ](implicit ev : T ): T = ev
20
20
Original file line number Diff line number Diff line change @@ -39,5 +39,5 @@ def test: Unit =
39
39
if ! (x3 != null ) then throw AssertionError ()
40
40
if x3 == null then impossible(new T {})
41
41
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