We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c00e85a commit a02ca5aCopy full SHA for a02ca5a
compiler/src/dotty/tools/dotc/transform/CheckUnused.scala
@@ -669,7 +669,7 @@ object CheckUnused:
669
670
def checkLocal(sym: Symbol, pos: SrcPos) =
671
if ctx.settings.WunusedHas.locals
672
- && !sym.is(InlineProxy)
+ && !sym.isOneOf(InlineProxy | Synthetic)
673
then
674
if sym.is(Mutable) && infos.asss(sym) then
675
warnAt(pos)(UnusedSymbol.localVars)
tests/warn/i24263.scala
@@ -0,0 +1,6 @@
1
+//> using options -Werror -Wunused:all
2
+
3
+object test {
4
+ def f(t: Tuple): Nothing = ???
5
+ val _ = (inputTuple: NamedTuple.NamedTuple[Tuple, Tuple]) => f(inputTuple)
6
+}
0 commit comments