Skip to content

implicitNotFound does not have concrete types for curried type alias #24157

@eejbyfeldt

Description

@eejbyfeldt

Compiler version

3.7.3 and Scala 3.8.0-RC1-bin-20251009-eb67a9c-NIGHTLY

Minimized example

@scala.annotation.implicitNotFound("Not found: ${X}, ${Y}")
trait TC[X, Y]

object TC {
  type From[X] = [Y] =>> TC[X, Y]

  def apply[X, Y: From[X]]: TC[X, Y] = ???

  apply[Int, String]
}

Output Error/Warning message

[error] ./not_found.scala:9:21
[error] Not found: X, Y
[error]   apply[Int, String]
[error] 

Why this Error/Warning was not helpful

The error message is not useful since X and Y is just the name of the type parameters.

Suggested improvement

It could be more helpful if X and Y was replaced by the concrete types Int and String.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: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