False positive unused pattern variable warnings in 3.7 nightly on `lazy val` tuple destructuring
Closed this issue · 1 comments
mrdziuban commented
Compiler version
3.7.0-RC1-bin-20250306-73ba485-NIGHTLY
Minimized code
With -Wunused:unsafe-warn-patvars enabled:
def foo: (Int, String) = (1, "foo")
lazy val (i, s) = fooOutput
-- [E198] Unused Symbol Warning: /Users/matt/scala3.7-nightly-unused/src/main/scala/example/Test.scala:2:10 ------------
2 |lazy val (i, s) = foo
| ^
| unused pattern variable
-- [E198] Unused Symbol Warning: /Users/matt/scala3.7-nightly-unused/src/main/scala/example/Test.scala:2:13 ------------
2 |lazy val (i, s) = foo
| ^
| unused pattern variableExpectation
The values should not be reported unused because they're public
som-snytt commented
Note -Wunused:patvars. (Somewhere I removed obsolete options, but that prevents existing CB from building.)
It looks like lazy val is not represented in the test suite.