1
1
package dotty .tools .dotc
2
2
package transform
3
3
4
+ import dotty .tools .dotc .core .Annotations .Annotation
4
5
import dotty .tools .dotc .core .Phases .NeedsCompanions
5
6
import dotty .tools .dotc .typer .Mode
6
7
@@ -91,7 +92,7 @@ class LazyVals extends MiniPhaseTransform with IdentityDenotTransformer with Nee
91
92
appendOffsetDefs.get(cls) match {
92
93
case None => template
93
94
case Some (data) =>
94
- data.defs.foreach(_.symbol.addAnnotation(defn.ScalaStaticAnnot ))
95
+ data.defs.foreach(_.symbol.addAnnotation(Annotation ( defn.ScalaStaticAnnot ) ))
95
96
cpy.Template (template)(body = addInFront(data.defs, template.body))
96
97
}
97
98
@@ -358,7 +359,7 @@ class LazyVals extends MiniPhaseTransform with IdentityDenotTransformer with Nee
358
359
.symbol.asTerm
359
360
} else { // need to create a new flag
360
361
offsetSymbol = ctx.newSymbol(companion.moduleClass, (StdNames .nme.LAZY_FIELD_OFFSET + id.toString).toTermName, Flags .Synthetic , defn.LongType ).enteredAfter(this )
361
- offsetSymbol.addAnnotation(defn.ScalaStaticAnnot )
362
+ offsetSymbol.addAnnotation(Annotation ( defn.ScalaStaticAnnot ) )
362
363
val flagName = (StdNames .nme.BITMAP_PREFIX + id.toString).toTermName
363
364
val flagSymbol = ctx.newSymbol(claz, flagName, containerFlags, defn.LongType ).enteredAfter(this )
364
365
flag = ValDef (flagSymbol, Literal (Constants .Constant (0L )))
@@ -368,7 +369,7 @@ class LazyVals extends MiniPhaseTransform with IdentityDenotTransformer with Nee
368
369
369
370
case None =>
370
371
offsetSymbol = ctx.newSymbol(companion.moduleClass, (StdNames .nme.LAZY_FIELD_OFFSET + " 0" ).toTermName, Flags .Synthetic , defn.LongType ).enteredAfter(this )
371
- offsetSymbol.addAnnotation(defn.ScalaStaticAnnot )
372
+ offsetSymbol.addAnnotation(Annotation ( defn.ScalaStaticAnnot ) )
372
373
val flagName = (StdNames .nme.BITMAP_PREFIX + " 0" ).toTermName
373
374
val flagSymbol = ctx.newSymbol(claz, flagName, containerFlags, defn.LongType ).enteredAfter(this )
374
375
flag = ValDef (flagSymbol, Literal (Constants .Constant (0L )))
0 commit comments