File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ class Mixin extends MiniPhase with SymTransformer { thisPhase =>
242
242
// transformFollowing call is needed to make memoize & lazy vals run
243
243
transformFollowing(DefDef (implementation(getter.asTerm), rhs))
244
244
}
245
- else if (isScala2x || was(getter, ParamAccessor )) EmptyTree
245
+ else if (isScala2x || was(getter, ParamAccessor | Lazy )) EmptyTree
246
246
else initial
247
247
}
248
248
}
Original file line number Diff line number Diff line change
1
+ super[A] init
2
+ x()
Original file line number Diff line number Diff line change
1
+ trait A {
2
+ println(s " super[A] init " )
3
+ lazy val x = { println(" super[A].x()" ); 123 }
4
+ }
5
+
6
+ class B extends A {
7
+ override lazy val x = { println(" x()" ); 456 }
8
+ }
9
+
10
+ object Test { def main (args : Array [String ]): Unit = { new B ().x } }
You can’t perform that action at this time.
0 commit comments