-
Notifications
You must be signed in to change notification settings - Fork 18k
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
runtime: strange panic message #12046
Comments
Please discuss why it should not compile, the program seems legal to me.
Somewhere in the runtime the stack trace printing routine attempts to output the value panic was called with. It handles predeclared types, like eg. string, and probably some others. The argument to FTR: converting the argument to |
This is working as expected. The panic messages is telling you the type followed by the value. panic handles the predeclared type "string" specially, and it handles types that implement the fmt.Stringer method specially. |
"why it should not compile?" |
The literal "a=" is an untyped constant. This is not string + st, it's untyped + st. |
Thanks. I just forgot that. |
I have following program.
http://play.golang.org/p/0DCktht8U2
I think it should not compile, but it compile and got the panic message:
The text was updated successfully, but these errors were encountered: