What version of Go are you using (go version)?
go version go1.18rc1 linux/amd64
Does this issue reproduce with the latest release?
yes
What did you do?
Tried to play with generics after installing go 1.18 RC1, but was a little confused by the error message
when trying to use 1.18 feature like the any keyword because I totally forgot about the go version in go.mod.
./main.go:30:25: undeclared name: any (requires version go1.18 or later)
Mentioning go.mod in the error message would have helped fixing the error directly instead of having to re-check my config and search for this error message etc
What did you expect to see?
./main.go:30:25: undeclared name: any (requires version go1.18 or later, current min version in go.mod: go1.16)
What did you see instead?
./main.go:30:25: undeclared name: any (requires version go1.18 or later)
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
yes
What did you do?
Tried to play with generics after installing go 1.18 RC1, but was a little confused by the error message
when trying to use 1.18 feature like the
anykeyword because I totally forgot about the go version ingo.mod../main.go:30:25: undeclared name: any (requires version go1.18 or later)Mentioning
go.modin the error message would have helped fixing the error directly instead of having to re-check my config and search for this error message etcWhat did you expect to see?
./main.go:30:25: undeclared name: any (requires version go1.18 or later, current min version in go.mod: go1.16)
What did you see instead?
./main.go:30:25: undeclared name: any (requires version go1.18 or later)