diff options
Diffstat (limited to 'tests/patmat/t4408.scala')
-rw-r--r-- | tests/patmat/t4408.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/patmat/t4408.scala b/tests/patmat/t4408.scala new file mode 100644 index 000000000..419b66369 --- /dev/null +++ b/tests/patmat/t4408.scala @@ -0,0 +1,16 @@ +object Test { + def printList(in: List[String]): Unit = in match { + case Nil => Unit + + case (s: String) :: Nil => + println(s) + + case head :: (s: String) :: Nil => + printList(head :: Nil) + for(i <- head){ + print(i) + } + println + println(s) + } +} |