Skip to content

HKT error report not that clear. #11637

Closed
@ShuiRuTian

Description

@ShuiRuTian

Compiler version

3.0.0RC1
If you're not sure what version you're using, run print scalaVersion from sbt
(if you're running scalac manually, use scalac -version instead).

Minimized example

// This is OK
class FunctorImpl[Generic1[T] <: Iterable[T]]{}
class HKT3_1[Functor[Generic2[T]<:Set[T]]]{}
var h = new HKT3_1[FunctorImpl]();

// This is has error
class FunctorImpl[Generic1[T] <: Iterable[T]]{}
class HKT3_1[Functor[Generic2[T<:String]<:Set[T]]]{}
var h = new HKT3_1[FunctorImpl]();
// Error: Type argument FunctorImpl does not conform to upper bound [Generic2[T] <: Set[T]] =>> Any

Output

No output

Expectation

I am not sure, maybe [Generic2[T<:String] <: Set[T]] =>> Any? However, current error message is not enough.
And it would be nice to explain why it is not work in detailed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions