Skip to content

Warnings from -Wshadow:type-parameter-shadow do not have a ErrorMessageId #25069

@eejbyfeldt

Description

@eejbyfeldt

Compiler version

3.8.3-RC1-bin-20260123-506b8a0-NIGHTLY

Minimized example

object test {
  type T = Int
  def f[T] = ???
}

Output Error/Warning message

$ scala-cli compile --server=false -S 3.7.4 shadow_id.scala -Wshadow:type-parameter-shadow
-- Warning: /home/ejbyfeldt/dev/scala_playground/shadow_id.scala:3:8 -----------
3 |  def f[T] = ???
  |        ^
  |Type parameter T for method f shadows the type defined by type T in object test
1 warning found

Why this Error/Warning was not helpful

There is not error message id which is inconsistent with most other warnings.

Suggested improvement

It could be made more helpful by including a error message id.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:lintingLinting warnings enabled with -W or -Xlintarea:reportingError reporting including formatting, implicit suggestions, etcbetter-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesitype:enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions