Skip to content

-Wunused gives warnings to values used in annotations #16877

@markehammons

Description

@markehammons

Compiler version

3.3.0-RC2

Minimized code

import org.openjdk.jmh.annotations.*, Mode.{SingleShotTime, Throughput} import java.util.concurrent.TimeUnit @State(Scope.Thread) @BenchmarkMode(Array(Throughput, SingleShotTime)) @Fork( jvmArgsAppend = Array( "--enable-preview", "--enable-native-access=ALL-UNNAMED" ) ) @OutputTimeUnit(TimeUnit.MICROSECONDS) class Test

https://scastie.scala-lang.org/W9ZhbHhJTr2zjkBC5FwUXQ

Output

unused imports for singleshot time, throughput, and TimeUnit

Expectation

These are clearly used.

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