Skip to content

Commit a523bca

Browse files
committed
Remove IdentArgs
1 parent 9a2a1ee commit a523bca

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

compiler/src/scala/quoted/runtime/impl/Matcher.scala

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import scala.annotation.{Annotation, compileTimeOnly}
66

77
import dotty.tools.dotc
88
import dotty.tools.dotc.core.Contexts._
9+
import dotty.tools.dotc.core.Contexts._
10+
import dotty.tools.dotc.core.StdNames.nme
911

1012
/** Matches a quoted tree against a quoted pattern tree.
1113
* A quoted pattern tree may have type and term holes in addition to normal terms.
@@ -389,17 +391,6 @@ object Matcher {
389391
accumulator.foldTree(Set.empty, term)(Symbol.spliceOwner)
390392
}
391393

392-
private object IdentArgs {
393-
def unapply(args: List[Term]): Option[List[Ident]] =
394-
args.foldRight(Option(List.empty[Ident])) {
395-
case (id: Ident, Some(acc)) => Some(id :: acc)
396-
case (Block(List(DefDef("$anonfun", TermParamClause(params) :: Nil, Inferred(), Some(Apply(id: Ident, args)))), Closure(Ident("$anonfun"), None)), Some(acc))
397-
if params.zip(args).forall(_.symbol == _.symbol) =>
398-
Some(id :: acc)
399-
case _ => None
400-
}
401-
}
402-
403394
private def treeOptMatches(scrutinee: Option[Tree], pattern: Option[Tree])(using Env): Matching = {
404395
(scrutinee, pattern) match {
405396
case (Some(x), Some(y)) => x =?= y

0 commit comments

Comments
 (0)