-
Notifications
You must be signed in to change notification settings - Fork 18k
go/types, govet: panics when encountering (string constant) + string(rune constant) #4982
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
Labels
Milestone
Comments
You could improve the debugging experience by: * choosing a function in the trace (for example checker.stmt) * add a recover there: x := recover() switch x.(type) { case nil: // nothing case bailout: panic(x) default: buf := new(bytes.Buffer) format.Node(buf, token.NewFileSet(), stmt /* the ast.Stmt argument */) printf("PANIC during checking %q: %v", x) panic(x) } Anyway, the crash is easy to reproduce: package main import "fmt" const A = "hello" const B = 142 func main() { fmt.Println(A + string(B)) } |
Please try CL 7474043 and check if that fixes your issue. https://golang.org/cl/7474043 Labels changed: added go1.1, removed go1.1maybe. Owner changed to @remyoudompheng. Status changed to Started. |
Owner changed to @griesemer. Status changed to Accepted. |
This issue was closed by revision 0b2caf2. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: