Skip to content

Commit c8371e4

Browse files
authored
Merge pull request #8089 from dotty-staging/fix-typeParams
Rename confusing method
2 parents c4f6fee + b54ed9b commit c8371e4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

compiler/src/dotty/tools/dotc/ast/untpd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
749749
}
750750

751751
/** Is there a subtree of this tree that satisfies predicate `p`? */
752-
def (tree: Tree).existsSubTree(p: Tree => Boolean)(implicit ctx: Context): Boolean = {
752+
def (tree: Tree) existsSubTree(p: Tree => Boolean)(implicit ctx: Context): Boolean = {
753753
val acc = new UntypedTreeAccumulator[Boolean] {
754754
def apply(x: Boolean, t: Tree)(implicit ctx: Context) = x || p(t) || foldOver(x, t)
755755
}

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3745,7 +3745,7 @@ object Types {
37453745
NoType
37463746
}
37473747

3748-
def typeParams(implicit ctx: Context): List[ParamInfo] = {
3748+
def tyconTypeParams(implicit ctx: Context): List[ParamInfo] = {
37493749
val tparams = tycon.typeParams
37503750
if (tparams.isEmpty) HKTypeLambda.any(args.length).typeParams else tparams
37513751
}
@@ -4693,7 +4693,7 @@ object Types {
46934693
case nil =>
46944694
nil
46954695
}
4696-
derivedAppliedType(tp, this(tp.tycon), mapArgs(tp.args, tp.typeParams))
4696+
derivedAppliedType(tp, this(tp.tycon), mapArgs(tp.args, tp.tyconTypeParams))
46974697

46984698
case tp: RefinedType =>
46994699
derivedRefinedType(tp, this(tp.parent), this(tp.refinedInfo))
@@ -5000,7 +5000,7 @@ object Types {
50005000
case nil =>
50015001
true
50025002
}
5003-
if (distributeArgs(args, tp.typeParams))
5003+
if (distributeArgs(args, tp.tyconTypeParams))
50045004
range(tp.derivedAppliedType(tycon, loBuf.toList),
50055005
tp.derivedAppliedType(tycon, hiBuf.toList))
50065006
else range(defn.NothingType, defn.AnyType)
@@ -5109,7 +5109,7 @@ object Types {
51095109
}
51105110
foldArgs(acc, tparams.tail, args.tail)
51115111
}
5112-
foldArgs(this(x, tycon), tp.typeParams, args)
5112+
foldArgs(this(x, tycon), tp.tyconTypeParams, args)
51135113

51145114
case _: BoundType | _: ThisType => x
51155115

0 commit comments

Comments
 (0)