-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
go.tools/go/types assertion failure in recordTypeAndValue #8169
Labels
Milestone
Comments
kardianos: thanks for the bug report. gri: the failing assertion's condition is false if the type is Invalid, which can be caused by undefined symbol errors. A minimal testcase is shown below. % head src/[abc]/*.go ==> src/a/A.go <== package a ==> src/b/B.go <== package b import "a" const Z = a.X | a.Y ==> src/c/main.go <== package main import "b" func main() { println(b.Z) } % GOPATH=. ./ssadump c src/b/B.go:5:11: X not declared by package a src/b/B.go:5:17: Y not declared by package a panic: assertion failed [recovered] panic: assertion failed goroutine 16 [running]: runtime.panic(0x657a40, 0xc208000df0) /home/adonovan/go/src/pkg/runtime/panic.c:279 +0xf5 code.google.com/p/go.tools/go/types.(*checker).handleBailout(0xc208024000, 0xc2080b3790) /home/adonovan/got9/src/code.google.com/p/go.tools/go/types/check.go:202 +0xcd runtime.panic(0x657a40, 0xc208000df0) /home/adonovan/go/src/pkg/runtime/panic.c:248 +0x18d code.google.com/p/go.tools/go/types.assert(0x7f28a9e1f400) /home/adonovan/got9/src/code.google.com/p/go.tools/go/types/errors.go:18 +0x68 code.google.com/p/go.tools/go/types.(*checker).recordTypeAndValue(0xc208024000, 0x7f28a9e23c38, 0xc20800e760, 0x7f28a9e1f410, 0x8cd920, 0x7f28a9e1f3d8, 0x0) /home/adonovan/got9/src/code.google.com/p/go.tools/go/types/check.go:252 +0x70 code.google.com/p/go.tools/go/types.(*checker).rawExpr(0xc208024000, 0xc208049280, 0x7f28a9e23c38, 0xc20800e760, 0x0, 0x0, 0x0) ... Owner changed to @griesemer. |
Status changed to Duplicate. Merged into issue #8518. |
This issue was closed.
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
The text was updated successfully, but these errors were encountered: