We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e92b31 commit 8ff2615Copy full SHA for 8ff2615
tests/pos/i14494.scala
@@ -1,6 +1,9 @@
1
object ImplNotFound:
2
+ class TOP
3
+ class STR(s: String) extends TOP
4
+ class INT(i: Int) extends TOP
5
def main(args: Array[String]): Unit =
- val res: Seq[String | Int] = (??? : Seq[Int]).collect {
- case 1 => Seq("")
- case 2 => Seq(1)
6
+ val res: Seq[STR | INT] = (??? : Seq[Int]).collect {
7
+ case 1 => Seq(STR(""))
8
+ case 2 => Seq(INT(1))
9
}.flatten
0 commit comments