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

Comments

@OneOfOne
Copy link
Contributor

@OneOfOne OneOfOne commented May 13, 2021

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
Copy link
Contributor

@heschi heschi commented May 14, 2021

@findleyr
Copy link
Contributor

@findleyr findleyr commented May 14, 2021

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

@findleyr
Copy link
Contributor

@findleyr findleyr commented Jun 22, 2021

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.

@findleyr findleyr closed this Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants