Skip to content

Deprecation warning despite @nowarn #13038

Closed
@hnrklssn

Description

@hnrklssn

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().

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions