Skip to content

Commit 7b407e5

Browse files
committed
Make LazyVals an IdentityDenotTransformer
1 parent 0a9c61c commit 7b407e5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/dotty/tools/dotc/transform/LazyVals.scala

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import SymUtils._
1919
import scala.collection.mutable.ListBuffer
2020
import dotty.tools.dotc.core.Denotations.SingleDenotation
2121
import dotty.tools.dotc.core.SymDenotations.SymDenotation
22-
import dotty.tools.dotc.core.DenotTransformers.DenotTransformer
22+
import dotty.tools.dotc.core.DenotTransformers.{IdentityDenotTransformer, DenotTransformer}
2323

2424
class LazyValTranformContext {
2525

@@ -35,7 +35,7 @@ class LazyValTranformContext {
3535
class OffsetInfo(var defs: List[Tree], var ord:Int)
3636
val appendOffsetDefs = mutable.Map.empty[Name, OffsetInfo]
3737

38-
class LazyValsTransform extends MiniPhaseTransform with DenotTransformer {
38+
class LazyValsTransform extends MiniPhaseTransform with IdentityDenotTransformer {
3939

4040
override def phaseName: String = "LazyVals"
4141

@@ -51,10 +51,6 @@ class LazyValTranformContext {
5151
* before this phase starts processing same tree */
5252
// override def ensureAfter: Set[String] = Set("mixin")
5353

54-
def transform(ref: SingleDenotation)(implicit ctx: Context): SingleDenotation = {
55-
ref
56-
}
57-
5854
override def transformValDef(tree: ValDef)(implicit ctx: Context, info: TransformerInfo): Tree = {
5955
if (!(tree.mods is Flags.Lazy) || (tree.mods is Flags.ModuleVal)) tree
6056
else {

0 commit comments

Comments
 (0)