diff --git a/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala b/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala index a682925e22a8..9d63f71eed6f 100644 --- a/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala +++ b/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala @@ -669,7 +669,7 @@ object CheckUnused: def checkLocal(sym: Symbol, pos: SrcPos) = if ctx.settings.WunusedHas.locals - && !sym.is(InlineProxy) + && !sym.isOneOf(InlineProxy | Synthetic) then if sym.is(Mutable) && infos.asss(sym) then warnAt(pos)(UnusedSymbol.localVars)