@@ -64,9 +64,17 @@ object Matcher {
6464
6565 (normalize(scrutinee), normalize(pattern)) match {
6666
67+ // Match a scala.internal.Quoted.patternHole typed as a repeated argument and return the scrutinee tree
68+ case (IsTerm (scrutinee @ Typed (s, tpt1)), Typed (TypeApply (patternHole, tpt :: Nil ), tpt2))
69+ if patternHole.symbol == kernel.Definitions_InternalQuoted_patternHole &&
70+ s.tpe <:< tpt.tpe &&
71+ tpt2.tpe.derivesFrom(definitions.RepeatedParamClass ) =>
72+ Some (Tuple1 (scrutinee.seal))
73+
6774 // Match a scala.internal.Quoted.patternHole and return the scrutinee tree
6875 case (IsTerm (scrutinee), TypeApply (patternHole, tpt :: Nil ))
69- if patternHole.symbol == kernel.Definitions_InternalQuoted_patternHole && scrutinee.tpe <:< tpt.tpe =>
76+ if patternHole.symbol == kernel.Definitions_InternalQuoted_patternHole &&
77+ scrutinee.tpe <:< tpt.tpe =>
7078 Some (Tuple1 (scrutinee.seal))
7179
7280 //
@@ -85,7 +93,7 @@ object Matcher {
8593 case (Select (qual1, _), Select (qual2, _)) if scrutinee.symbol == pattern.symbol =>
8694 treeMatches(qual1, qual2)
8795
88- case (IsRef (_), IsRef (_, _ )) if scrutinee.symbol == pattern.symbol =>
96+ case (IsRef (_), IsRef (_)) if scrutinee.symbol == pattern.symbol =>
8997 Some (())
9098
9199 case (Apply (fn1, args1), Apply (fn2, args2)) if fn1.symbol == fn2.symbol =>
0 commit comments