diff options
Diffstat (limited to 'src/dotty/tools/dotc/transform/Memoize.scala')
-rw-r--r-- | src/dotty/tools/dotc/transform/Memoize.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/transform/Memoize.scala b/src/dotty/tools/dotc/transform/Memoize.scala index fbf8ed763..b775496ae 100644 --- a/src/dotty/tools/dotc/transform/Memoize.scala +++ b/src/dotty/tools/dotc/transform/Memoize.scala @@ -91,6 +91,7 @@ import Decorators._ } } else if (sym.isSetter) { if (!sym.is(ParamAccessor)) { val Literal(Constant(())) = tree.rhs } // this is intended as an assertion + field.setFlag(Mutable) // necessary for vals mixed in from Scala2 traits val initializer = Assign(ref(field), ref(tree.vparamss.head.head.symbol)) cpy.DefDef(tree)(rhs = transformFollowingDeep(initializer)(ctx.withOwner(sym), info)) } |