summaryrefslogtreecommitdiff
path: root/test/files/run/range.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/range.scala')
-rw-r--r--test/files/run/range.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/run/range.scala b/test/files/run/range.scala
index f08b2105d3..b81e67921a 100644
--- a/test/files/run/range.scala
+++ b/test/files/run/range.scala
@@ -16,6 +16,17 @@ object Test {
catch { case _: IllegalArgumentException => true }
)
assert(caught)
+ // #7432
+ val noElemAtMin = (
+ try { (10 until 10).min ; false }
+ catch { case _: NoSuchElementException => true }
+ )
+ assert(noElemAtMin)
+ val noElemAtMax = (
+ try { (10 until 10).max ; false }
+ catch { case _: NoSuchElementException => true }
+ )
+ assert(noElemAtMax)
}
case class GR[T](val x: T)(implicit val num: Integral[T]) {