-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: ICE on method value involving imported anonymous interface #58563
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 also reproducible on tip. @golang/compiler @mdempsky |
internal compiler error: assertion failed
when returning a pointer to an anonymous interface func from another package
@mdempsky It seems to me that the assertion failed due to mismatch between method selection position. There're two distinct anonymous interface types |
@cuonglm Yeah, I think the assertion can just be relaxed. I have a CL, just power was out in my apt all day. |
Change https://go.dev/cl/471676 mentions this issue: |
@gopherbot Please backport to 1.20. |
Backport issue(s) opened: #58776 (for 1.20). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
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?
./pkg/pkg.go
./main.go
What did you expect to see?
Successful build.
What did you see instead?
I can fix it by allocating the return of
Start()
or using a named interface, or avoiding to return the pointer to Stop interface by chaning start() to:Also I couldn't reproduce it if merging in the same package.
The text was updated successfully, but these errors were encountered: