Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some deprecation warnings fail the build with -Werror flag, even if annotated with @nowarn #17969

Open
flindskog opened this issue Jun 13, 2023 · 0 comments
Labels
area:reporting Error reporting including formatting, implicit suggestions, etc itype:bug

Comments

@flindskog
Copy link

flindskog commented Jun 13, 2023

Compiler version

3.3.0

Minimized code

import scala.annotation.nowarn
object Foo {
  private def bar[T](body: => T): T = body

  def foo(): String = bar {
    @nowarn("cat=deprecation")
    val m = implicitly[Manifest[String]]
    m.runtimeClass.getName
  }
}

Output

The code fails to build when compiling with the scalac flag -Werror.

Expectation

Expect the code to compile, since the deprecation warning is suppressed.

@flindskog flindskog added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Jun 13, 2023
@mbovel mbovel added area:reporting Error reporting including formatting, implicit suggestions, etc and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:reporting Error reporting including formatting, implicit suggestions, etc itype:bug
Projects
None yet
Development

No branches or pull requests

2 participants