-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: internal compiler error: InitTodoFunc still has declarations (with -G=3) #45722
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
Comments
This is the code section that is originating the panic: go/src/cmd/compile/internal/pkginit/init.go Lines 62 to 67 in a956a0e
I will do a bit more digging. |
This is being generated directly from go/src/cmd/compile/internal/gc/main.go Lines 196 to 199 in 95ed5c3
The decls that are causing the panic seem to be either the results of
|
Clearly related to the new code dealing with generic functions. Replacing the generic func try(v int, err error) int {
if err != nil {
panic(err)
}
return v
} makes the error go away. |
Change https://golang.org/cl/313869 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Program compiles and runs with no output
What did you see instead?
Program fails to compile with an internal compiler error:
The text was updated successfully, but these errors were encountered: