Skip to content

Commit 04f563a

Browse files
committed
Rename ImplicitMethodType -> OldImplicitMethodType
1 parent 3470300 commit 04f563a

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ object Types {
7171
* +- GroundType -+- AndType
7272
* +- OrType
7373
* +- MethodOrPoly ---+-- PolyType
74-
* | +-- MethodType ---+- ImplicitMethodType
74+
* | +-- MethodType ---+- OldImplicitMethodType
7575
* | +- GivenMethodType
7676
* | +- ErasedMethodType
7777
* | +- JavaMethodType
@@ -3184,12 +3184,12 @@ object Types {
31843184

31853185
final override def isJavaMethod: Boolean = companion eq JavaMethodType
31863186
final override def isImplicitMethod: Boolean =
3187-
companion.eq(ImplicitMethodType) ||
3188-
companion.eq(ErasedImplicitMethodType) ||
3187+
companion.eq(OldImplicitMethodType) ||
3188+
companion.eq(ErasedOldImplicitMethodType) ||
31893189
isGivenMethod
31903190
final override def isErasedMethod: Boolean =
31913191
companion.eq(ErasedMethodType) ||
3192-
companion.eq(ErasedImplicitMethodType) ||
3192+
companion.eq(ErasedOldImplicitMethodType) ||
31933193
companion.eq(ErasedGivenMethodType)
31943194
final override def isGivenMethod: Boolean =
31953195
companion.eq(GivenMethodType) ||
@@ -3296,7 +3296,7 @@ object Types {
32963296
else if (isGiven)
32973297
if (isErased) ErasedGivenMethodType else GivenMethodType
32983298
else if (isOldImplicit)
3299-
if (isErased) ErasedImplicitMethodType else ImplicitMethodType
3299+
if (isErased) ErasedOldImplicitMethodType else OldImplicitMethodType
33003300
else
33013301
if (isErased) ErasedMethodType else MethodType
33023302
}
@@ -3305,8 +3305,8 @@ object Types {
33053305
object ErasedMethodType extends MethodTypeCompanion("ErasedMethodType")
33063306
object GivenMethodType extends MethodTypeCompanion("GivenMethodType")
33073307
object ErasedGivenMethodType extends MethodTypeCompanion("ErasedGivenMethodType")
3308-
object ImplicitMethodType extends MethodTypeCompanion("ImplicitMethodType")
3309-
object ErasedImplicitMethodType extends MethodTypeCompanion("ErasedImplicitMethodType")
3308+
object OldImplicitMethodType extends MethodTypeCompanion("ImplicitMethodType")
3309+
object ErasedOldImplicitMethodType extends MethodTypeCompanion("ErasedImplicitMethodType")
33103310

33113311
/** A ternary extractor for MethodType */
33123312
object MethodTpe {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ class TreeUnpickler(reader: TastyReader,
356356
case ERASEDGIVENMETHODtype =>
357357
readMethodic(ErasedGivenMethodType, _.toTermName)
358358
case IMPLICITMETHODtype =>
359-
readMethodic(ImplicitMethodType, _.toTermName)
359+
readMethodic(OldImplicitMethodType, _.toTermName)
360360
case TYPELAMBDAtype =>
361361
readMethodic(HKTypeLambda, _.toTypeName)
362362
case PARAMtype =>

compiler/src/dotty/tools/dotc/typer/Deriving.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ trait Deriving { this: Typer =>
159159
* where `T_1, ..., T_n` are the first-kinded type parameters in `Ts`,
160160
* the typeclass instance has the form
161161
*
162-
* implicit def derived$D(implicit ev_1: D[T_1], ..., ev_n: D[T_n]): D[C[Ts]] = D.derived
162+
* implicit def derived$D given (ev_1: D[T_1], ..., ev_n: D[T_n]): D[C[Ts]] = D.derived
163163
*
164164
* See the body of this method for how to generalize this to typeclasses with more
165165
* or less than one type parameter.
@@ -219,7 +219,7 @@ trait Deriving { this: Typer =>
219219
val clsParams: List[TypeSymbol] = clsParamss.flatten
220220
val instanceInfo =
221221
if (clsParams.isEmpty) ExprType(resultType)
222-
else PolyType.fromParams(clsParams, ImplicitMethodType(evidenceParamInfos, resultType))
222+
else PolyType.fromParams(clsParams, GivenMethodType(evidenceParamInfos, resultType))
223223
addDerivedInstance(originalType.typeSymbol.name, instanceInfo, derived.sourcePos, reportErrors = true)
224224
}
225225
}

0 commit comments

Comments
 (0)