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/vet: doesn't use the typeparams parser even with the flags / tag. #46163

Closed
OneOfOne opened this issue May 13, 2021 · 3 comments
Closed

cmd/vet: doesn't use the typeparams parser even with the flags / tag. #46163

OneOfOne opened this issue May 13, 2021 · 3 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@OneOfOne
Copy link
Contributor

What version of Go are you using (go version)?

$ go version
go version devel go1.17-5c3524a906 2021-05-13 15:37:53 -0500 linux/amd64

What did you do?

$ cat > t.go <<WUT
package main

func main() {}
type s[T any] struct {t *T}
WUT

$ go vet -gcflags=-G=3 -tags typeparams ./t.go

What did you expect to see?

No errors.

What did you see instead?

# command-line-arguments
vet: ./t.go:4:10: expected ']', found any
@heschi heschi added this to the Backlog milestone May 14, 2021
@heschi heschi added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 14, 2021
@heschi
Copy link
Contributor

heschi commented May 14, 2021

@findleyr
Copy link
Contributor

You need to rebuild vet with -tags=typeparams. go install -tags=typeparams cmd/vet should work.

@findleyr
Copy link
Contributor

There is no longer any build constraint required on the dev.typeparams branch, which will be merged to master once the tree opens again. I think this can be closed, please reopen if there's anything additional.

@golang golang locked and limited conversation to collaborators Jun 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants