]> Cypherpunks repositories - gostls13.git/commit
go/types: fix version downgrade bug without Config.GoVersion
authorRuss Cox <rsc@golang.org>
Wed, 19 Apr 2023 20:05:37 +0000 (16:05 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 20 Apr 2023 14:56:22 +0000 (14:56 +0000)
commit4f9a966926e2537c435e60e75e5c866374be07e7
tree56764cd136df360f3f0fdeb557c992192e006153
parentb4b70a4617fa318ae3e3f3b3d1bb9241d4dc0f9e
go/types: fix version downgrade bug without Config.GoVersion

The gVisor team reported a regression in their checkers,
which don't set Config.GoVersion, processing files that say
//go:build go1.13 but still use 'any' (which happened in Go 1.18).
That situation should continue to work, since it worked before,
so add a special case for not knowing the GoVersion.

Change-Id: I8820d8ccbdf76d304e2c7e45f6aaa993ff3d16a6
Reviewed-on: https://go-review.googlesource.com/c/go/+/486398
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/api.go
src/cmd/compile/internal/types2/check.go
src/go/types/api.go
src/go/types/check.go