- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.1k
 
Open
Labels
area:lintingLinting warnings enabled with -W or -XlintLinting warnings enabled with -W or -Xlintitype:bugstat:fixed in nextThe issue was fixed in Next and only still applies to LTS.The issue was fixed in Next and only still applies to LTS.
Description
Compiler version
3.3.7
Minimized code
class Foo {
  def foo(): Any = {
    var i = 0 // <- warning here
    val f = () => i += 1
    f
  }
}Output
[warn] -- [E198] Unused Symbol Warning: .../ThunkSuite.scala:3:8
[warn] 3 |    var i = 0
[warn]   |        ^
[warn]   |        unused local definitionExpectation
No warning (as i is not unused; in fact, if I remove i, that results in an error).
Related: typelevel/cats-effect#4519
Metadata
Metadata
Assignees
Labels
area:lintingLinting warnings enabled with -W or -XlintLinting warnings enabled with -W or -Xlintitype:bugstat:fixed in nextThe issue was fixed in Next and only still applies to LTS.The issue was fixed in Next and only still applies to LTS.