cmd/compile: compiler accepts range over int for any language version #64704
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
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.
The text was updated successfully, but these errors were encountered: