File tree 2 files changed +8
-3
lines changed
src/dotty/tools/dotc/core 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -280,6 +280,11 @@ object Contexts {
280
280
final def withMode (mode : Mode ): Context =
281
281
if (mode != this .mode) fresh.withNewMode(mode) else this
282
282
283
+ def withPhase (phase : PhaseId ): Context =
284
+ if (this .phaseId == phaseId) this else fresh.withPhase(phase)
285
+ def withPhase (phase : Phase ): Context =
286
+ withPhase(phase.id)
287
+
283
288
final def addMode (mode : Mode ): Context = withMode(this .mode | mode)
284
289
final def maskMode (mode : Mode ): Context = withMode(this .mode & mode)
285
290
final def retractMode (mode : Mode ): Context = withMode(this .mode &~ mode)
@@ -324,8 +329,8 @@ object Contexts {
324
329
325
330
def withProperty (prop : (String , Any )): this .type = withMoreProperties(moreProperties + prop)
326
331
327
- def withPhase (pid : PhaseId ): this .type = withPeriod(Period (runId, pid))
328
- def withPhase (phase : Phase ): this .type = withPhase(phase.id)
332
+ override def withPhase (pid : PhaseId ): this .type = withPeriod(Period (runId, pid))
333
+ override def withPhase (phase : Phase ): this .type = withPhase(phase.id)
329
334
330
335
def withSetting [T ](setting : Setting [T ], value : T ): this .type =
331
336
withSettings(setting.updateIn(sstate, value))
Original file line number Diff line number Diff line change @@ -524,7 +524,7 @@ object Denotations {
524
524
val transformer = ctx.denotTransformers(nextTranformerId)
525
525
// println(s"transforming with $transformer")
526
526
if (currentPeriod.lastPhaseId > transformer.id)
527
- next = transformer.transform(cur).syncWithParents
527
+ next = transformer.transform(cur)(ctx.withPhase(startPid)) .syncWithParents
528
528
if (next eq cur)
529
529
startPid = cur.validFor.firstPhaseId
530
530
else {
You can’t perform that action at this time.
0 commit comments