go/test/typeparam/issue51836.dir/aa.go
Robert Findley fd1b5904ae cmd/compile/internal/importer: key tparams by Package instead of pkgname
The importer type param index used package name type parameter key,
causing type parameters to be reused/overwritten if two packages in the
import graph had the same combination of (name, declaration name, type
parameter name).

Fix this by instead using the *Package in the key.

Fixes #51836

Change-Id: I881ceaf3cf7c1ab4e0835962350feb552e79b233
Reviewed-on: https://go-review.googlesource.com/c/go/+/394219
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2022-03-22 21:38:10 +00:00

14 lines
225 B
Go

// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package a
import (
"./a"
)
type T[K any] struct {
t a.T[K]
}