Skip to content

Commit 5177b87

Browse files
test: add in a regression test for #14642 (#17512)
[skip community_build] closes #14642
2 parents c084600 + 33e71b3 commit 5177b87

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/pos/i14642.scala

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)