Skip to content

Commit 612d781

Browse files
Merge pull request #7215 from dotty-staging/fix-7043
Fix #7043: Add regression test
2 parents 89a92f2 + 0c4246c commit 612d781

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/neg/7043.scala

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
object Test {
2+
type StrHead[X <: Tuple] = X match {
3+
case (x <: String) *: _ => x // error
4+
}
5+
6+
// Futher minimized
7+
type M[X] = X match {
8+
case (x) *: _ => Int
9+
}
10+
11+
// The exception can also be reached with normal pattern matching
12+
1 match {
13+
case _: Option[(x)] => ()
14+
}
15+
}

0 commit comments

Comments
 (0)