Skip to content

Type bounds are not shown in type errors #9971

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
IndiscriminateCoding opened this issue Oct 8, 2020 · 0 comments · Fixed by #9979
Closed

Type bounds are not shown in type errors #9971

IndiscriminateCoding opened this issue Oct 8, 2020 · 0 comments · Fixed by #9979
Milestone

Comments

@IndiscriminateCoding
Copy link

Minimized code

trait G[F[_]]

def f(x: G[List]) = ???

def a: G[[A <: Int] =>> List[A]] = ???
def b = f(a)

Output

Found:    G[List]
Required: G[List]

Expectation

I expect type bound A <: Int to be shown in error messages so it wouldn't be so confusing

odersky added a commit to dotty-staging/dotty that referenced this issue Oct 11, 2020
The unapply method of EtaExpansion was missing several necessary
conditions, which are now added:

 - parameters and arguments must have same length
 - bounds must conform
@nicolasstucki nicolasstucki linked a pull request Oct 12, 2020 that will close this issue
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Oct 12, 2020
@Kordyjan Kordyjan added this to the 3.0.0 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants