object Test {
def foo(a: Stream[Either[Int, String]]): Int = a match {
case Right(_) #:: tail =>
1
case Left(_) #:: tail =>
2
case Stream.Empty =>
3
}
}
Test.scala:2: match may not be exhaustive.
[warn] It would fail on the following input: Cons()
[warn] def foo(a: Stream[Either[Int, String]]): Int = a match {
[warn] ^
[warn] one warning found