Skip to content

Commit e55684f

Browse files
committed
Move LambdaType.isImplicit to MethodType.isImplicit
Use Type.isImplicitMethod instead of LambdaType.isImplicit
1 parent 301c855 commit e55684f

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ object Denotations {
325325
if (tp1.isInstanceOf[PolyType] && tp2.isInstanceOf[MethodType]) tp2
326326
else if (tp2.isInstanceOf[PolyType] && tp1.isInstanceOf[MethodType]) tp1
327327
else if (ctx.typeComparer.matchingParams(tp1, tp2) &&
328-
tp1.isImplicit == tp2.isImplicit)
328+
tp1.isImplicitMethod == tp2.isImplicitMethod)
329329
tp1.derivedLambdaType(
330330
mergeParamNames(tp1, tp2), tp1.paramInfos,
331331
infoMeet(tp1.resultType, tp2.resultType.subst(tp2, tp1)))
@@ -481,7 +481,7 @@ object Denotations {
481481
tp2 match {
482482
case tp2: MethodOrPoly
483483
if ctx.typeComparer.matchingParams(tp1, tp2) &&
484-
tp1.isImplicit == tp2.isImplicit =>
484+
tp1.isImplicitMethod == tp2.isImplicitMethod =>
485485
tp1.derivedLambdaType(
486486
mergeParamNames(tp1, tp2), tp1.paramInfos,
487487
tp1.resultType | tp2.resultType.subst(tp2, tp1))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
508508
case tp1: MethodOrPoly =>
509509
(tp1.signature consistentParams tp2.signature) &&
510510
matchingParams(tp1, tp2) &&
511-
tp1.isImplicit == tp2.isImplicit &&
511+
tp1.isImplicitMethod == tp2.isImplicitMethod &&
512512
isSubType(tp1.resultType, tp2.resultType.subst(tp2, tp1))
513513
case _ =>
514514
false

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2512,8 +2512,6 @@ object Types {
25122512

25132513
override def resultType(implicit ctx: Context) = resType
25142514

2515-
def isImplicit = false
2516-
25172515
def isDependent(implicit ctx: Context): Boolean
25182516
def isParamDependent(implicit ctx: Context): Boolean
25192517

@@ -2700,7 +2698,7 @@ object Types {
27002698
final def companion: MethodTypeCompanion = MethodType.withKind(kind)
27012699

27022700
final def isJava: Boolean = kind is JavaKind
2703-
final override def isImplicit: Boolean = kind is ImplicitKind
2701+
final def isImplicit: Boolean = kind is ImplicitKind
27042702

27052703
val paramInfos = paramInfosExp(this)
27062704
val resType = resultTypeExp(this)

0 commit comments

Comments
 (0)