Skip to content

Commit 7aa1ee2

Browse files
committed
Fix DenotTransformer#validFor
This method was unused so far but will be used in the next commit. The validity period of a transformed denotation starts at the phase after the transformer has been run.
1 parent 40cc430 commit 7aa1ee2

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ object DenotTransformers {
2424
/** The last phase during which the transformed denotations are valid */
2525
def lastPhaseId(implicit ctx: Context) = ctx.nextDenotTransformerId(id + 1)
2626

27-
/** The validity period of the transformer in the given context */
27+
/** The validity period of the transformed denotations in the given context */
2828
def validFor(implicit ctx: Context): Period =
29-
Period(ctx.runId, id, lastPhaseId)
29+
Period(ctx.runId, id + 1, lastPhaseId)
3030

3131
/** The transformation method */
3232
def transform(ref: SingleDenotation)(implicit ctx: Context): SingleDenotation

compiler/src/dotty/tools/dotc/transform/ExtensionMethods.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ class ExtensionMethods extends MiniPhase with DenotTransformer with FullParamete
6262
val decls1 = cinfo.decls.cloneScope
6363
val moduleSym = moduleClassSym.symbol.asClass
6464

65-
var newSuperClass: Type = null
66-
6765
ctx.atPhase(thisPhase.next) { implicit ctx =>
6866
// In Scala 2, extension methods are added before pickling so we should
6967
// not generate them again.

0 commit comments

Comments
 (0)