go/internal/gcimporter: set iexportVersionGenerics to 2

Now that the standard library importer/exporter has been updated for a
while, we can set iexportVersionGenerics to its final value -- 2.

Fixes golang/go#47654

Change-Id: I27eca4cf2b82b7c09e2b6a754c6e5e5af71a7b29
Reviewed-on: https://go-review.googlesource.com/c/tools/+/377554
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
Trust: Dan Scales <danscales@google.com>
This commit is contained in:
Robert Findley 2022-01-10 18:46:59 -05:00
parent f234b3d4ab
commit 52e9527420
1 changed files with 4 additions and 13 deletions

View File

@ -45,20 +45,11 @@ func (r *intReader) uint64() uint64 {
}
// Keep this in sync with constants in iexport.go.
//
// Temporarily, the x/tools importer accepts generic code at both version 1 and
// 2. However, version 2 contains some breaking changes on top of version 1:
// - the 'implicit' bit is added to exported constraints
// - a 'kind' byte is added to constant values (not yet done)
//
// Once we've completed the bump to version 2 in the standard library, we'll
// remove support for generics here at version 1.
const (
iexportVersionGo1_11 = 0
iexportVersionPosCol = 1
iexportVersionGo1_18 = 2
// TODO: before release, change this back to 2.
iexportVersionGenerics = iexportVersionPosCol
iexportVersionGo1_11 = 0
iexportVersionPosCol = 1
iexportVersionGo1_18 = 2
iexportVersionGenerics = 2
)
type ident struct {