Skip to content

Commit 2881dee

Browse files
committed
Address review comments
1 parent 70535c8 commit 2881dee

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,7 @@ object Types {
14301430
/** If this is an ignored proto type, its underlying type, otherwise the type itself */
14311431
def revealIgnored: Type = this
14321432

1433-
/** If this is a proto type, the ignored version, otherwise the type itself */
1433+
/** If this is a proto type, WildcardType, otherwise the type itself */
14341434
def dropIfProto: Type = this
14351435

14361436
// ----- Substitutions -----------------------------------------------------

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -493,16 +493,16 @@ trait ImplicitRunInfo { self: Run =>
493493
override implicit protected val ctx: Context = liftingCtx
494494
override def stopAtStatic = true
495495

496+
private def isLiftTarget(sym: Symbol) = sym.isClass || sym.isOpaqueAlias
497+
496498
def apply(tp: Type) = tp match {
497499
case tp: TypeRef =>
498-
val sym = tp.symbol
499-
if (sym.isClass || sym.isOpaqueAlias) tp
500+
if (isLiftTarget(tp.symbol)) tp
500501
else {
501502
val pre = tp.prefix
502503
def joinClass(tp: Type, cls: Symbol) =
503504
AndType.make(tp, cls.typeRef.asSeenFrom(pre, cls.owner))
504505
val lead = if (pre eq NoPrefix) defn.AnyType else apply(pre)
505-
def isLiftTarget(sym: Symbol) = sym.isClass || sym.isOpaqueAlias
506506
(lead /: tp.parentSymbols(isLiftTarget))(joinClass)
507507
}
508508
case tp: TypeVar =>
@@ -583,7 +583,7 @@ trait ImplicitRunInfo { self: Run =>
583583
val liftedTp = if (isLifted) tp else liftToClasses(tp)
584584
val refs =
585585
if (liftedTp ne tp) {
586-
implicitsDetailed.println(i"lifted of $tp = $liftedTp")
586+
implicitsDetailed.println(i"lifted of $tp = $liftedTp")
587587
iscope(liftedTp, isLifted = true).companionRefs
588588
}
589589
else

0 commit comments

Comments
 (0)