File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -165,8 +165,11 @@ class Mixin extends MiniPhaseTransform with SymTransformer { thisTransform =>
165
165
transformFollowing(
166
166
DefDef (implementation(getter.asTerm),
167
167
if (isScala2x) {
168
- if (getter.is(Flags .Lazy )) // lazy vals need to have a rhs that will be the lazy initializer
169
- ref(mixin.implClass).select(getter.name).appliedTo(This (ctx.owner.asClass))
168
+ if (getter.is(Flags .Lazy )) { // lazy vals need to have a rhs that will be the lazy initializer
169
+ val reciever = ref(mixin.implClass)
170
+ val sym = reciever.tpe.nonPrivateDecl(getter.name).suchThat(_.is(Lazy )).symbol // lazy val can be overloaded
171
+ ref(mixin.implClass).select(sym).appliedTo(This (ctx.owner.asClass))
172
+ }
170
173
else default
171
174
} else initial)
172
175
)
You can’t perform that action at this time.
0 commit comments