Robert Griesemer
Robert Griesemer
Moving to 1.25; too late for 1.24.
This specific error is perhaps not too hard to fix individually. Re-using the compiler's syntax package's parser code, but producing go/ast may be a good solution in the long run....
For reference, for the above program, the compiler produces simply ``` foo.go:8:21: syntax error: unexpected fmt in argument list; possibly missing comma or ) ```
I don't see what's wrong here: the file specifies the language version as go1.10 and `any` is not available in 1.10, so this error is legit. The code behaves the...
@rittneje I see. If the compiler is invoked without a valid -lang version, or a -lang version before go1.21, than file local versions are ignored and the code is compiled...
Perhaps GCFLAGS can be used to set -lang in GOPATH mode.
@aclements for visibility. We should try to resolve this one way or another for 1.23.
@rsc Just to be clear, the suggested change will ignore any file-specific downgrade to a version lower than 1.21. Is that your suggestion? With the proposed fix, with 1.23 it...
@adonovan FWIW, the above CL addresses this particular issue. Note though that while in `T{{x}}` both the outer composite literal `T{{x}}` and the inner `{x}` now have an (invalid) type...
The [CL](https://go.dev/cl/601035) addresses the issue for 1.23. This is now a tracking issue for the complete fix in 1.24.