File tree 2 files changed +10
-1
lines changed
src/dotty/tools/dotc/typer
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -826,7 +826,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
826
826
}
827
827
828
828
def typedAppliedTypeTree (tree : untpd.AppliedTypeTree )(implicit ctx : Context ): Tree = track(" typedAppliedTypeTree" ) {
829
- val tpt1 = typed(tree.tpt)
829
+ val tpt1 = typed(tree.tpt)(ctx retractMode Mode . Pattern )
830
830
val tparams = tpt1.tpe.typeParams
831
831
var args = tree.args
832
832
if (tparams.isEmpty) {
Original file line number Diff line number Diff line change @@ -93,6 +93,15 @@ object Patterns {
93
93
case t : a2.B =>
94
94
t
95
95
}
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
+
96
105
}
97
106
98
107
object NestedPattern {
You can’t perform that action at this time.
0 commit comments