-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: internal compiler error: found illegal assignment on test example #56916
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
Does this reproduce on 1.19? |
Yes, it's still reproducing with Go 1.19.3. $ go version
go version go1.19.3 linux/amd64 |
does it reproduce with tip and can you provide a self contained reproducer? |
Here is the self contained reproducer: https://go.dev/play/p/fKiLojMe4D5. Interestingly enough it does not reproduce here. But I have tried on two different instances: go1.19.3 running under Windows WSL and another one go1.18.5 and it does reproduce on both instances. |
I cannot get this to reproduce on either 1.18.5 or 1.19.3 (or tip).
where Could you be more specific about exactly the commands you used to reproduce? Possibly this has something to do with WSL - could you try on a native linux box? |
The error message in question ("found illegal assignment") comes from noder/transform.go, which is only used by the non-unified frontend, so this might be fixed in Go 1.20. Though it's also possible we'll just report a different diagnostic instead. |
Here's a repro: https://go.dev/play/p/LMhy3PPut-C The issue is that the 1.18/1.19 Go compiler frontend doesn't handle local generic types correctly. This will be fixed in 1.20. |
Duplicate of #54456. |
@mdempsky thanks a lot for checking this up. |
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I was experimenting with generics and implemented a service retry utility function which looks like the following (some irrelevant part might be skipped):
This is working correctly, without producing any kind of issues, but if I'm trying to replicate the same test function as an example, I'm getting the following error:
What did you expect to see?
To run without any kind of errors.
What did you see instead?
The error I mentioned above.
The text was updated successfully, but these errors were encountered: