Skip to content

Deprecated inline method does not generate deprecation warning #19913

Closed
@2m

Description

@2m

Compiler version

3.4.0, 3.4.1-RC1, 3.3.3.

Minimized code

Two deprecated methods, one inline.

//> using scala 3.4.0
//> using option -deprecation

object Deprecated:

  @deprecated("test")
  def method() = ???

  @deprecated("test")
  inline def inlineMethod() = ???

object Test:
  Deprecated.method()
  Deprecated.inlineMethod()

Output

Deprecation warning is not shown for the inline method.

[warn] ./depr.sc:13:3
[warn] method method in object Deprecated is deprecated: test
[warn]   Deprecated.method()
[warn]

Expectation

Both deprecated methods generate deprecation warnings. This was noticed in Iltotore/iron#229

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions