Skip to content

Deprecation warning despite @nowarn #13038

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

Closed
hnrklssn opened this issue Jul 9, 2021 · 2 comments
Closed

Deprecation warning despite @nowarn #13038

hnrklssn opened this issue Jul 9, 2021 · 2 comments

Comments

@hnrklssn
Copy link

hnrklssn commented Jul 9, 2021

Compiler version

3.0.1-RC2

Minimized code

import scala.annotation.nowarn
trait A
case class Test(s: String) extends A
@nowarn def f(): String => A = Test

Output

[warn] -- Warning: Test.scala:4:31 ------
[warn] 4  |@nowarn def f(): String => A = Test
[warn]    |                               ^^^^
[warn]    |The method `apply` is inserted. The auto insertion will be deprecated, please write `Test.apply` explicitly.

Expectation

No warnings emitted originating in f().

@lrytz
Copy link
Member

lrytz commented Jul 9, 2021

@nowarn support is in the works #12857

@dwijnand
Copy link
Member

Duplicate of #8908

@dwijnand dwijnand marked this as a duplicate of #8908 Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants