Skip to content

Commit 5c4493b

Browse files
committed
test: add in a regression test for #8300
Closes #8300
1 parent cba5c9a commit 5c4493b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/pos/i8300.scala

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// https://github.com/lampepfl/dotty/issues/8300
2+
3+
type Bar[X] = X match {
4+
case List[a] => List[Tuple1[a]]
5+
case Set[a] => Set[Tuple1[a]]
6+
}
7+
8+
object Test:
9+
(Set(1, 2, 3), List("a", "b")).map(
10+
[A] =>
11+
(a: A) =>
12+
a match {
13+
case it: Iterable[x] => it.map(Tuple1(_)).asInstanceOf[Bar[A]]
14+
}
15+
)

0 commit comments

Comments
 (0)