Skip to content

Commit 5166393

Browse files
committed
Remove default case to ensure match
1 parent 25435cd commit 5166393

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

tests/run/reflect-select-copy2/assert_1.scala renamed to tests/run-with-compiler/reflect-select-copy/assert_1.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ object scalatest {
3939
}
4040
}
4141
}.seal[Unit]
42-
43-
case _ =>
44-
'{ scala.Predef.assert(~cond) }
4542
}
4643
}
4744

tests/run/reflect-select-copy2/test_2.scala renamed to tests/run-with-compiler/reflect-select-copy/test_2.scala

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@ object Test {
1414

1515
def main(args: Array[String]): Unit = {
1616
val a = Box(Some(10))
17+
val five: Float = 5.0f
18+
val six: Double = 6.0
19+
val ten: Int = 10
1720
assert(a.v === Some(10))
18-
assert(10 > 5)
19-
assert(4.0 < 5)
20-
assert(6.0 > 5L)
21+
assert(five < six)
22+
assert(five > 4)
23+
assert(ten > 5)
24+
assert(six < 7)
25+
assert(six > 5L)
2126
assert(Box(6) > Box(6))
2227
assert(Box("h") > Box("h"))
2328
}

0 commit comments

Comments
 (0)