-
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
cmd/compile: internal compiler error: shape types have no methods #55134
Comments
1.18 is an outdated version; please try 1.18.5 or 1.19.1. |
I've tested it with go 1.19.1 too, the issue persists. |
This comment was marked as duplicate.
This comment was marked as duplicate.
I did it, the issue persists. |
I've tested it with go 1.19.1 too, the issue persists. |
This seems fixed at tip. github.com/amirdlt/flex builds successfully. I think we can close this. Feel free to reopen if it doesn't. Maybe this is a dup of another issue, but I'm not sure which one. There are a few "shape types have no methods" issues (https://github.com/golang/go/issues?q=is%3Aissue+%22shape+types+have+no+methods%22). It seems unified IR fixes this (it fails to build with |
FYI, this does not seem to be a dup of any existed issue, the compiler still crashes with |
It was not a compile error, It compiled successfully, I get an internal compiler error at runtime not compile time. |
The text "internal compiler error" says clearly it is a compile time error. |
I'm sorry, I've made a dumbly mistake. You're right. |
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?
I assign a function argument of type
func(any) any
into a map[string]any as a value e.g.m["func"] = func(any) any {return nil}
, then read the map andassert type then use it, It leads to an internal compiler error in the line I wanted to call the function.
The situation that it has happened is a bit complicated, I've pushed my code on a github project linked
below. You can see the issue by run the main.go file, if you want to get more info.
Btw I have used generics which can caused this issue probably.
project: https://github.com/amirdlt/flex
What did you expect to see?
Program should be compiled and run successfully
What did you see instead?
The text was updated successfully, but these errors were encountered: