Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

SI-5440 Test case for exhaustiveness check

Reported against patmatclassic, working in virtpatmat.
  • Loading branch information...
commit 4aba0fe2a2195176693509c735ffdedb52352720 1 parent 9ea0a20
@retronym retronym authored
View
5 test/files/neg/t5440.check
@@ -0,0 +1,5 @@
+t5440.scala:3: error: match may not be exhaustive.
+It would fail on the following inputs: (List(_), Nil), (Nil, List(_))
+ (list1, list2) match {
+ ^
+one error found
View
1  test/files/neg/t5440.flags
@@ -0,0 +1 @@
+-Xfatal-warnings
View
7 test/files/neg/t5440.scala
@@ -0,0 +1,7 @@
+object Test {
+ def merge(list1: List[Long], list2: List[Long]): Boolean =
+ (list1, list2) match {
+ case (hd1::_, hd2::_) => true
+ case (Nil, Nil) => true
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.