-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport "CheckUnused checks type param annotations" to LTS (#22091)
Backports #20549 to the 3.3.5. PR submitted by the release tooling. [skip ci]
- Loading branch information
Showing
2 changed files
with
31 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
//> using options -Wunused:all | ||
object Anns { | ||
final class S extends annotation.StaticAnnotation | ||
} | ||
|
||
object Main { | ||
locally { | ||
import Anns.* | ||
class C[@S A] | ||
C().toString | ||
} | ||
locally { | ||
import Anns.S as T | ||
class C[@T A] | ||
C().toString | ||
} | ||
locally { | ||
import scala.specialized as T | ||
class C[@T A] | ||
C().toString | ||
} | ||
locally { | ||
import scala.specialized as T // warn | ||
class C[A] | ||
C().toString | ||
} | ||
} |