From 41d71e59a3eb2746cc2e4365025d1ae289c9ebe8 Mon Sep 17 00:00:00 2001 From: Matt Bovel Date: Wed, 23 Oct 2024 18:20:20 +0200 Subject: [PATCH 1/2] Fix typo in allTermArguments [Cherry-picked aa9115dbfa25f18a8abb5d555be77fbb3dc3b8bc] --- compiler/src/dotty/tools/dotc/ast/TreeInfo.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala index 465fa2b765f8..d221f396fcd6 100644 --- a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala +++ b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala @@ -136,9 +136,9 @@ trait TreeInfo[T <: Untyped] { self: Trees.Instance[T] => /** All term arguments of an application in a single flattened list */ def allTermArguments(tree: Tree): List[Tree] = unsplice(tree) match { - case Apply(fn, args) => allArguments(fn) ::: args - case TypeApply(fn, args) => allArguments(fn) - case Block(_, expr) => allArguments(expr) + case Apply(fn, args) => allTermArguments(fn) ::: args + case TypeApply(fn, args) => allTermArguments(fn) + case Block(_, expr) => allTermArguments(expr) case _ => Nil } From 91f9a29037aea11840f1a1f866487d233ac20f59 Mon Sep 17 00:00:00 2001 From: Matt Bovel Date: Thu, 24 Oct 2024 16:10:53 +0200 Subject: [PATCH 2/2] Remove redundant `with Checking` `ReTyper` already extends `Typer` which extends `Checking` [Cherry-picked fcfa6b0a43a4e477867d5e27404946a9de0b9d24] --- compiler/src/dotty/tools/dotc/transform/TreeChecker.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala b/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala index f634defbbea2..33d1ea20df14 100644 --- a/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala +++ b/compiler/src/dotty/tools/dotc/transform/TreeChecker.scala @@ -206,7 +206,7 @@ object TreeChecker { private[TreeChecker] def isValidJVMMethodName(name: Name): Boolean = name.toString.forall(isValidJVMMethodChar) - class Checker(phasesToCheck: Seq[Phase]) extends ReTyper with Checking { + class Checker(phasesToCheck: Seq[Phase]) extends ReTyper { import ast.tpd.* protected val nowDefinedSyms = util.HashSet[Symbol]()