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: copylocks check needs updating for aliases #17755

Closed
josharian opened this issue Nov 3, 2016 · 1 comment
Closed

cmd/vet: copylocks check needs updating for aliases #17755

josharian opened this issue Nov 3, 2016 · 1 comment
Milestone

Comments

@josharian
Copy link
Contributor

$ go tool vet go/types
go/types/scope.go:159: method WriteTo(w io.Writer, n int, recurse bool) should have signature WriteTo(io.Writer) (int64, error)
panic: interface conversion: ast.Spec is *ast.AliasSpec, not *ast.ValueSpec

goroutine 1 [running]:
panic(0x12804a0, 0xc420e23c40)
	/Users/josh/go/tip/src/runtime/panic.go:531 +0x1cf
main.checkCopyLocksGenDecl(0xc420e1e000, 0xc420e23a80)
	/Users/josh/go/tip/src/cmd/vet/copylock.go:64 +0x303
main.checkCopyLocks(0xc420e1e000, 0x13da720, 0xc420e23a80)
	/Users/josh/go/tip/src/cmd/vet/copylock.go:39 +0x188
main.(*File).Visit(0xc420e1e000, 0x13da720, 0xc420e23a80, 0x13d9760, 0xc420e1e000)
	/Users/josh/go/tip/src/cmd/vet/main.go:500 +0x106
go/ast.Walk(0x13d9760, 0xc420e1e000, 0x13da720, 0xc420e23a80)
	/Users/josh/go/tip/src/go/ast/walk.go:52 +0x66
go/ast.walkDeclList(0x13d9760, 0xc420e1e000, 0xc42001b480, 0x6, 0x8)
	/Users/josh/go/tip/src/go/ast/walk.go:38 +0x89
go/ast.Walk(0x13d9760, 0xc420e1e000, 0x13da620, 0xc42001b500)
	/Users/josh/go/tip/src/go/ast/walk.go:363 +0x2ce0
main.(*File).walkFile(0xc420e1e000, 0xc420a13f60, 0x1a, 0xc42001b500)
	/Users/josh/go/tip/src/cmd/vet/main.go:467 +0x120
main.doPackage(0xc420a126a0, 0x11, 0xc420e61980, 0x1, 0x1, 0x0, 0x0)
	/Users/josh/go/tip/src/cmd/vet/main.go:358 +0xbd1
main.doPackageDir(0xc420a126a0, 0x11)
	/Users/josh/go/tip/src/cmd/vet/main.go:287 +0x601
main.visit(0xc420a126a0, 0x11, 0x13dd480, 0xc420082ea0, 0x0, 0x0, 0x0, 0x0)
	/Users/josh/go/tip/src/cmd/vet/main.go:374 +0xe6
path/filepath.walk(0xc420a126a0, 0x11, 0x13dd480, 0xc420082ea0, 0x12ce4e8, 0x0, 0x0)
	/Users/josh/go/tip/src/path/filepath/path.go:351 +0x81
path/filepath.walk(0x7fff5fbff5bd, 0x8, 0x13dd480, 0xc42008fa00, 0x12ce4e8, 0x0, 0xc420043e78)
	/Users/josh/go/tip/src/path/filepath/path.go:376 +0x414
path/filepath.Walk(0x7fff5fbff5bd, 0x8, 0x12ce4e8, 0xc, 0xc42008f930)
	/Users/josh/go/tip/src/path/filepath/path.go:398 +0x14c
main.walkDir(0x7fff5fbff5bd, 0x8)
	/Users/josh/go/tip/src/cmd/vet/main.go:389 +0x41
main.main()
	/Users/josh/go/tip/src/cmd/vet/main.go:243 +0x308

Happens while checking file go/types/testdata/alias.go.

@josharian josharian added this to the Go1.8 milestone Nov 3, 2016
@gopherbot
Copy link

CL https://golang.org/cl/32588 mentions this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants