File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,7 @@ trait SymDenotations { thisCtx: Context =>
85
85
case denot : SymDenotation =>
86
86
def explainSym (msg : String ) = explain(s " $msg\n defined = ${denot.definedPeriodsString}" )
87
87
if (denot.isOneOf(ValidForeverFlags ) || denot.isRefinementClass) true
88
- else {
89
- implicit val ctx = thisCtx
88
+ else inContext(thisCtx) {
90
89
val initial = denot.initial
91
90
if ((initial ne denot) || ctx.phaseId != initial.validFor.firstPhaseId)
92
91
ctx.withPhase(initial.validFor.firstPhaseId).traceInvalid(initial)
Original file line number Diff line number Diff line change @@ -235,7 +235,8 @@ class TypeComparer(initctx: Context) extends ConstraintHandling[AbsentContext] w
235
235
def firstTry : Boolean = tp2 match {
236
236
case tp2 : NamedType =>
237
237
def compareNamed (tp1 : Type , tp2 : NamedType ): Boolean =
238
- implicit val ctx : Context = this .ctx
238
+ val ctx = this .ctx
239
+ given Context = ctx // optimization for performance
239
240
val info2 = tp2.info
240
241
info2 match
241
242
case info2 : TypeAlias =>
You can’t perform that action at this time.
0 commit comments