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 1c9d27a commit 55f235cCopy full SHA for 55f235c
compiler/src/dotty/tools/dotc/transform/CheckUnused.scala
@@ -697,7 +697,7 @@ object CheckUnused:
697
698
def checkLocal(sym: Symbol, pos: SrcPos) =
699
if ctx.settings.WunusedHas.locals
700
- && !sym.is(InlineProxy)
+ && !sym.isOneOf(InlineProxy | Synthetic)
701
then
702
if sym.is(Mutable) && infos.asss(sym) then
703
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