Skip to content

HKT error report not that clear. #11637

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ShuiRuTian opened this issue Mar 7, 2021 · 0 comments · Fixed by #11643
Closed

HKT error report not that clear. #11637

ShuiRuTian opened this issue Mar 7, 2021 · 0 comments · Fixed by #11643
Milestone

Comments

@ShuiRuTian
Copy link

ShuiRuTian commented Mar 7, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants