Skip to content

-Wunused: false positive for pure expressions in for-yield #16823

Closed
@hejfelix

Description

@hejfelix

Compiler version

3.3.0-RC2

Minimized code

  for
    x <- List(1,2,3) // unused pattern variable warning
    y = x * 2
  yield y

Expectation

no warning since the pattern variable is used in the pure expression

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:lintingLinting warnings enabled with -W or -Xlintitype:bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions