-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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 using float in range #67785
Comments
CC @golang/compiler |
Note: this does work correctly at tip. It is only 1.22 that fails. (1.21 is also ok.) |
Looks like a duplicate of #67027, and I cannot reproduce this in the 1.22 branch, but there's no error message (which there should be one). Leaving open to investigate further. |
I can reproduce from both the tip 1.22 branch and 1.22.3 release. |
Change https://go.dev/cl/590095 mentions this issue: |
Closing this in favor of #67798 which is the backport of the respective fix in Go 1.23. |
Go version
go version go1.22.3 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
Here is the complete program (5 lines):
What did you see happen?
This was the ouput
What did you expect to see?
An error explaining that you can not use a
float64
type as a for loop variable in a range loop.This totally unhelpful error took me a long time to isolate, without any line number information.
The text was updated successfully, but these errors were encountered: