-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: need better error message for unsatisfied constraints due to type mismatch #49179
Comments
Change https://golang.org/cl/366757 mentions this issue: |
Change https://golang.org/cl/366758 mentions this issue: |
…failure - Thread type argument expressions (rather than posLists) through various type-checker functions so we can provide a better error position. - Adjust signatures that expect a syntax.Pos to accept a poser instead to avoid gratuituous conversions from expressions to positions. - Rename targsx to xlist so we use xlist consistently for expression lists. First step in providing a better error message for the issue below. For #49179. Change-Id: I8fc685a2ee4f5640f4abd35568ba32bcb34e9e84 Reviewed-on: https://go-review.googlesource.com/c/go/+/366757 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
Change https://golang.org/cl/367198 mentions this issue: |
Change https://golang.org/cl/367199 mentions this issue: |
This is a port of CL 366757 from types2 to go/types, adjusted for the different handling of index expressions in go/types. For #49179. Change-Id: Ic859eb09683134d055e28c8e0cb1f3814a87dc5c Reviewed-on: https://go-review.googlesource.com/c/go/+/367198 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
This is a port of CL 366758 from types2 to go/types. For #49179. Change-Id: I7e1c6ffb392d5c535cf901004b7acbe8c3be9b0f Reviewed-on: https://go-review.googlesource.com/c/go/+/367199 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
Compiling
produces
It's hard to see what the error is. It should have been
We need to produce a better error message in cases like these. This will frustrate a lot of users.
cc: @findleyr
The text was updated successfully, but these errors were encountered: