File tree 1 file changed +2
-6
lines changed
src/dotty/tools/dotc/transform 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -59,16 +59,12 @@ class CapturedVars extends MiniPhase with IdentityDenotTransformer { thisTransfo
59
59
refMap.getOrElse(cls, refMap(defn.ObjectClass ))
60
60
}
61
61
62
- def capturedType (vble : Symbol )(implicit ctx : Context ): Type = {
63
- val oldInfo = vble.denot(ctx.withPhase(thisTransform)).info
64
- refCls(oldInfo.classSymbol, vble.isVolatile).typeRef
65
- }
66
-
67
62
override def prepareForValDef (vdef : ValDef )(implicit ctx : Context ) = {
68
63
val sym = vdef.symbol
69
64
if (captured contains sym) {
70
65
val newd = sym.denot(ctx.withPhase(thisTransform)).copySymDenotation(
71
- info = refCls(sym.info.classSymbol, sym.hasAnnotation(defn.VolatileAnnot )).typeRef)
66
+ info = refCls(sym.info.classSymbol, sym.hasAnnotation(defn.VolatileAnnot )).typeRef,
67
+ initFlags = sym.flags &~ Mutable )
72
68
newd.removeAnnotation(defn.VolatileAnnot )
73
69
newd.installAfter(thisTransform)
74
70
}
You can’t perform that action at this time.
0 commit comments