Skip to content

Incomplete error message for higher-kinded bounds violations #4164

Closed
@smarter

Description

@smarter
class Foo[X]
object Test {
  def bla[M <: [X] => Foo[X]] = ???
  bla[Foo] // OK
  bla[[X <: Int] => Foo[X]] // error
}
-- [E057] Type Mismatch Error: try/i4160.scala:5:17 ----------------------------
5 |  bla[[X <: Int] => Foo[X]] // error
  |                 ^
  |                 Type argument Foo does not conform to upper bound Foo 

The type argument is incorrectly reduced to Foo leading to a meaningless error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:reportingError reporting including formatting, implicit suggestions, etcitype:bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions