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

Closed
griesemer opened this issue Jan 12, 2022 · 2 comments
Assignees
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@griesemer
Copy link
Contributor

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 the NeedsFix The path to resolution is known, but the work has not been done. label Jan 12, 2022
@griesemer griesemer added this to the Go1.19 milestone Jan 12, 2022
@findleyr
Copy link
Contributor

findleyr commented Mar 7, 2022

Note that with type-type inference disabled this issue becomes obsolete. Leaving it open for 1.19, depending on what we do.

@griesemer
Copy link
Contributor Author

griesemer commented Jun 23, 2022

Type type-inference has been removed and this now reports one error as expected. Closing.

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.
Projects
Development

No branches or pull requests

2 participants