@@ -289,7 +289,7 @@ class LazyVals extends MiniPhaseTransform with IdentityDenotTransformer {
289
289
290
290
val tpe = x.tpe.widen.resultType.widen
291
291
val claz = x.symbol.owner.asClass
292
- val thiz = This (claz)(ctx.fresh.setOwner( claz))
292
+ val thizClass = Literal ( Constant ( claz.info ))
293
293
val companion = claz.companionModule
294
294
val helperModule = ctx.requiredModule(" dotty.runtime.LazyVals" )
295
295
val getOffset = Select (ref(helperModule), RLazyValsNames_getOffset )
@@ -313,7 +313,7 @@ class LazyVals extends MiniPhaseTransform with IdentityDenotTransformer {
313
313
val flagName = (StdNames .nme.BITMAP_PREFIX + id.toString).toTermName
314
314
val flagSymbol = ctx.newSymbol(claz, flagName, containerFlags, defn.LongType ).enteredAfter(this )
315
315
flag = ValDef (flagSymbol, Literal (Constants .Constant (0L )))
316
- val offsetTree = ValDef (offsetSymbol, getOffset.appliedTo(thiz , Literal (Constant (flagName.toString))))
316
+ val offsetTree = ValDef (offsetSymbol, getOffset.appliedTo(thizClass , Literal (Constant (flagName.toString))))
317
317
info.defs = offsetTree :: info.defs
318
318
}
319
319
@@ -322,7 +322,7 @@ class LazyVals extends MiniPhaseTransform with IdentityDenotTransformer {
322
322
val flagName = (StdNames .nme.BITMAP_PREFIX + " 0" ).toTermName
323
323
val flagSymbol = ctx.newSymbol(claz, flagName, containerFlags, defn.LongType ).enteredAfter(this )
324
324
flag = ValDef (flagSymbol, Literal (Constants .Constant (0L )))
325
- val offsetTree = ValDef (offsetSymbol, getOffset.appliedTo(thiz , Literal (Constant (flagName.toString))))
325
+ val offsetTree = ValDef (offsetSymbol, getOffset.appliedTo(thizClass , Literal (Constant (flagName.toString))))
326
326
appendOffsetDefs += (companion.name.moduleClassName -> new OffsetInfo (List (offsetTree), ord))
327
327
}
328
328
0 commit comments