Skip to content

Commit 4eed95a

Browse files
add a test for a pattern match with ignored type param
1 parent 2019292 commit 4eed95a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/pos/Patterns.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@ object Patterns {
9393
case t: a2.B =>
9494
t
9595
}
96+
97+
class caseWithPatternVariableHelper1[A]
98+
class caseWithPatternVariableHelper2[A]
99+
100+
def caseWithPatternVariable(x: Any) = x match {
101+
case a: caseWithPatternVariableHelper1[_] => ()
102+
case b: caseWithPatternVariableHelper2[_] => ()
103+
}
104+
96105
}
97106

98107
object NestedPattern {

0 commit comments

Comments
 (0)