Skip to content

Warn when a user defined error message references undefined names #4008

Closed
@Jasper-M

Description

@Jasper-M

Currently dotty doesn't warn when you reference an unknown type parameter, but silently accepts it. It might be friendlier towards the user to warn that he probably made a typo.

scala> @annotation.implicitNotFound("Bar[${B}] not found") trait Bar[A] 
// defined trait Bar
scala> implicitly[Bar[String]] 
1 |implicitly[Bar[String]]
  |                       ^
  |                       Bar[${B}] not found

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions