Skip to content

Commit 514a0f2

Browse files
committed
Rename isArgPrefix to isArgPrefixOf
1 parent b743ec0 commit 514a0f2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ object Types {
186186
* `<this> . <symd>` is an actual argument reference, i.e. `this` is different
187187
* from the ThisType of `symd`'s owner.
188188
*/
189-
def isArgPrefix(symd: SymDenotation)(implicit ctx: Context) =
189+
def isArgPrefixOf(symd: SymDenotation)(implicit ctx: Context) =
190190
symd.is(ClassTypeParam) && {
191191
this match {
192192
case tp: ThisType => tp.cls ne symd.owner
@@ -1665,7 +1665,7 @@ object Types {
16651665
val symd = sym.lastKnownDenotation
16661666
if (symd.validFor.runId != ctx.runId && !ctx.stillValid(symd))
16671667
finish(memberDenot(symd.initial.name, allowPrivate = false))
1668-
else if (prefix.isArgPrefix(symd))
1668+
else if (prefix.isArgPrefixOf(symd))
16691669
finish(argDenot(sym.asType))
16701670
else if (infoDependsOnPrefix(symd, prefix))
16711671
finish(memberDenot(symd.initial.name, allowPrivate = symd.is(Private)))
@@ -1976,7 +1976,7 @@ object Types {
19761976
else if (lastDenotation == null) NamedType(prefix, designator)
19771977
else designator match {
19781978
case sym: Symbol =>
1979-
if (infoDependsOnPrefix(sym, prefix) && !prefix.isArgPrefix(sym)) {
1979+
if (infoDependsOnPrefix(sym, prefix) && !prefix.isArgPrefixOf(sym)) {
19801980
val candidate = reload()
19811981
val falseOverride = sym.isClass && candidate.symbol.exists && candidate.symbol != symbol
19821982
// A false override happens if we rebind an inner class to another type with the same name
@@ -3967,7 +3967,7 @@ object Types {
39673967
* underlying bounds to a range, otherwise return the expansion.
39683968
*/
39693969
def expandParam(tp: NamedType, pre: Type) = tp.argForParam(pre) match {
3970-
case arg @ TypeRef(pre, _) if pre.isArgPrefix(arg.symbol) =>
3970+
case arg @ TypeRef(pre, _) if pre.isArgPrefixOf(arg.symbol) =>
39713971
arg.info match {
39723972
case TypeBounds(lo, hi) => range(atVariance(-variance)(reapply(lo)), reapply(hi))
39733973
case arg => reapply(arg)

compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ class TreeUnpickler(reader: TastyReader, nameAtRef: NameRef => TermName, posUnpi
236236
val prefix = readType()
237237
val space = readType()
238238
space.decl(name) match {
239-
case symd: SymDenotation if prefix.isArgPrefix(symd.symbol) => TypeRef(prefix, symd.symbol)
239+
case symd: SymDenotation if prefix.isArgPrefixOf(symd.symbol) => TypeRef(prefix, symd.symbol)
240240
case _ => TypeRef(prefix, name, space.decl(name))
241241
}
242242
case REFINEDtype =>

0 commit comments

Comments
 (0)