Open thanm opened 7 months ago
@mdempsky
CL https://go-review.googlesource.com/c/go/+/534755 added the code to report mismatched version set by //go:build
.
It seems to me that the error returned by types2
posBase := terr.Pos.Base()
doesn't have the proper pos base?
I'm not sure this is intended, but sounds like the compiler should do it defensively by checking that file != nil
to prevent this case when it does not appear in posBaseMap
map.
cc @griesemer
Change https://go.dev/cl/569718 mentions this issue: cmd/compile: prevent nil dereference when using result from posBaseMap
Working on a linux/amd64 machine on tip:
I have run into a compiler bootstrapping issue with make.bash. To reproduce the issue, check out a Go repo at tip, then do this:
This adds a new file that makes use of the predeclared "min" function (added in Go 1.21). Once this file is in place, the boot strap crashes as follows:
This doesn't seem like intended behavior; if "min" is not allowed it would be better to have a more descriptive error.
Thanks