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

go/types, types2: better error message for cases of reverse type inference #60747

Open
griesemer opened this issue Jun 12, 2023 · 0 comments
Open
Assignees
Labels
NeedsFix The path to resolution is known, but the work has not been done. TypeInference Issue is related to generic type inference
Milestone

Comments

@griesemer
Copy link
Contributor

This is a reminder issue to follow up on feedback in https://go.dev/cl/501938 (#60688).

v9 func(string) []int = f5 // ERROR "type func(string) []int of variable in assignment does not match inferred type func(string) []string for func(P) []P"

Feedback (@findleyr):

I think a better error would be "type func(string) []int of variable v9 does not match inferred type func(string) []string for f5"

@griesemer griesemer added the NeedsFix The path to resolution is known, but the work has not been done. label Jun 12, 2023
@griesemer griesemer added this to the Go1.22 milestone Jun 12, 2023
@griesemer griesemer self-assigned this Jun 12, 2023
@griesemer griesemer added the TypeInference Issue is related to generic type inference label Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done. TypeInference Issue is related to generic type inference
Projects
None yet
Development

No branches or pull requests

1 participant