Skip to content

Regression when -deprecation option is missing #25095

@satorg

Description

@satorg

Compiler version

The issue seems to be reproducible with all Scala versions starting from 3.4.1.
All Scala versions from 3.4.0 and below (including 2.12 and 2.13) seem to be OK.

Minimized code

Whatever produces a deprecation warning, for example:

//> using scala 3.4.1
//> using options -Werror

object A {
  @deprecated("this one is deprecated", "ever")
  def imdeprecated() = ()

  imdeprecated()
}

Note: -deprecation is not provided.

Output

there was 1 deprecation warning; re-run with -deprecation for details
1 warning found

and the compilation succeeds(!).

Expectation

All Scala versions from 3.4.0 and below fail here:

there was 1 deprecation warning; re-run with -deprecation for details
1 error found
Compilation failed

Additional Context

Adding -deprecation changes the behavior (actually, fixes it): the compilation fails with all Scala versions.
In other words, the issue seems only to appear when -deprecation is missing.

Metadata

Metadata

Assignees

Labels

area:reportingError reporting including formatting, implicit suggestions, etcitype:bugregressionThis worked in a previous version but doesn't anymore

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions