File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
src/dotty/tools/dotc/typer Expand file tree Collapse file tree 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
826826 }
827827
828828 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 )
830830 val tparams = tpt1.tpe.typeParams
831831 var args = tree.args
832832 if (tparams.isEmpty) {
Original file line number Diff line number Diff 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
98107object NestedPattern {
You can’t perform that action at this time.
0 commit comments