Skip to content

Commit e330cc3

Browse files
committed
Follow standard naming pattern in LazyVals
1 parent be1965c commit e330cc3

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

src/dotty/tools/dotc/Compiler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class Compiler {
5757
new TailRec),
5858
List(new PatternMatcher,
5959
new ExplicitOuter,
60-
new LazyValTranformContext().transformer,
60+
new LazyValsTransform,
6161
new Splitter),
6262
List(new ElimByName,
6363
new InterceptedMethods,

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

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import dotty.tools.dotc.core.Denotations.SingleDenotation
2121
import dotty.tools.dotc.core.SymDenotations.SymDenotation
2222
import dotty.tools.dotc.core.DenotTransformers.{IdentityDenotTransformer, DenotTransformer}
2323

24-
class LazyValTranformContext {
24+
class LazyValsTransform extends MiniPhaseTransform with IdentityDenotTransformer {
2525

2626
import tpd._
2727

@@ -35,17 +35,9 @@ 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 IdentityDenotTransformer {
38+
override def phaseName: String = "LazyVals"
3939

40-
override def phaseName: String = "LazyVals"
41-
42-
override def treeTransformPhase = this.next
43-
44-
/** List of names of phases that should have finished their processing of all compilation units
45-
* before this phase starts */
46-
47-
/** List of names of phases that should have finished their processing of all compilation units
48-
* before this phase starts */
40+
override def treeTransformPhase = this.next
4941

5042
/** List of names of phases that should have finished processing of tree
5143
* before this phase starts processing same tree */
@@ -329,8 +321,6 @@ class LazyValTranformContext {
329321
Thicket(List(containerTree, accessor))
330322
else Thicket(List(containerTree, flag, accessor))
331323
}
332-
333-
}
334324
}
335325

336326

0 commit comments

Comments
 (0)