Skip to content

Commit b356d75

Browse files
committed
More tests
1 parent 135c139 commit b356d75

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tests/run/tuple-typetests.check

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
false
2+
true

tests/run/tuple-typetests.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
object Test extends App {
2+
3+
def nonEmpty(x: Any) = x match {
4+
case _: (h *: t) => true
5+
case () => false
6+
}
7+
8+
println(nonEmpty(()))
9+
println(nonEmpty(1, 2,3))
10+
}

0 commit comments

Comments
 (0)