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: no need to complain about missing type arguments after type inference error #50588

griesemer opened this issue Jan 12, 2022 · 0 comments


Copy link

@griesemer griesemer commented Jan 12, 2022

package p

type S[A, B any] struct {}

func _[A any](s S /* ERROR cannot infer B */ /* ERROR got 1 arguments but 2 type parameters */ [A]) {}

produces two error messages:

filename.go:5:17: cannot infer B (filename:go:3:11)
filename.go:5:17: got 1 arguments but 2 type parameters

There's no need to report the 2nd error.

Follow-up on #49541.

@griesemer griesemer added this to the Go1.19 milestone Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants