Skip to content
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

cmd/compile: bad error message for failing constraint type inference #57096

Closed
griesemer opened this issue Dec 5, 2022 · 1 comment
Closed
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@griesemer
Copy link
Contributor

package p

func f[S []E, E any]() {}

var _ = f[int] // ERROR S does not match []E

The error should be: int does not match []E.

@griesemer griesemer added the NeedsFix The path to resolution is known, but the work has not been done. label Dec 5, 2022
@griesemer griesemer added this to the Go1.20 milestone Dec 5, 2022
@griesemer griesemer self-assigned this Dec 5, 2022
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Dec 5, 2022
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/455278 mentions this issue: go/types, types2: better error message for failing constraint type inference

@golang golang locked and limited conversation to collaborators Dec 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants