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.
2 parents c084600 + 33e71b3 commit 5177b87Copy full SHA for 5177b87
tests/pos/i14642.scala
@@ -0,0 +1,16 @@
1
+// https://github.com/lampepfl/dotty/issues/14642
2
+case object A
3
+case class B()
4
+case class C()
5
+type Union = A.type | B | C
6
+val a: List[A.type] = ???
7
+val b: List[B] = ???
8
+val c: List[C] = ???
9
+val l1: List[Union] = a ++ b
10
+val l2: List[Union] =
11
+ a ++ b ++ c
12
+val l3: List[Union] =
13
+ (a: List[
14
+ Union
15
+ ]) ++ b ++ c
16
+val l4: List[Union] = (a: List[Union]) ++ (b ++ c)
0 commit comments