File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
src/dotty/tools/dotc/transform Expand file tree Collapse file tree 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
5959 refMap.getOrElse(cls, refMap(defn.ObjectClass ))
6060 }
6161
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-
6762 override def prepareForValDef (vdef : ValDef )(implicit ctx : Context ) = {
6863 val sym = vdef.symbol
6964 if (captured contains sym) {
7065 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 )
7268 newd.removeAnnotation(defn.VolatileAnnot )
7369 newd.installAfter(thisTransform)
7470 }
You can’t perform that action at this time.
0 commit comments