Go version
go version devel go1.22-27f02a1d25 Tue Dec 12 21:19:47 2023 -0800 darwin/amd64
What operating system and processor architecture are you using (go env)?
Not relevant. This is just a bug in the typechecker.
What did you do?
Compiled the following program (x.go) with: go tool compile -lang=go1.21.
package main
func main() {
for range 10 {
}
}
What did you expect to see?
An error: range over integers is only permitted with go1.22 and up.
What did you see instead?
No error.
Go version
go version devel go1.22-27f02a1d25 Tue Dec 12 21:19:47 2023 -0800 darwin/amd64
What operating system and processor architecture are you using (
go env)?Not relevant. This is just a bug in the typechecker.What did you do?
Compiled the following program (
x.go) with:go tool compile -lang=go1.21.What did you expect to see?
An error: range over integers is only permitted with go1.22 and up.
What did you see instead?
No error.