Skip to content

nowarn annotation does not work on inlined deprecation warning #24082

@eejbyfeldt

Description

@eejbyfeldt

Compiler version

3.7.3

Minimized code

//> using scala 3.7.3 //> using options -deprecation @deprecated case object A { inline def use: Any = A } @scala.annotation.nowarn object test { A.use } 

Output

-- Deprecation Warning: inline_deprecated.scala:8:4 ---------------------------- 8 | A.use | ^^^^^ | object A is deprecated |----------------------------------------------------------------------------- |Inline stack trace |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |This location contains code that was inlined from inline_deprecated.scala:3 3 | inline def use: Any = A | ^ ----------------------------------------------------------------------------- 1 warning found

Expectation

The warning should be silence by nowarn.

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions