From: Robert Griesemer Date: Wed, 26 Jun 2024 00:33:15 +0000 (-0700) Subject: go/types, types2: fix test name (for debugging) X-Git-Tag: go1.24rc1~1379 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f234c9423bd87e7bf81ad7d1bab2b452c722b3b1;p=gostls13.git go/types, types2: fix test name (for debugging) Change-Id: I982cf4da98af73ac41936a9d0b51588e3dbfd706 Reviewed-on: https://go-review.googlesource.com/c/go/+/594739 Reviewed-by: Robert Griesemer LUCI-TryBot-Result: Go LUCI Reviewed-by: Tim King Auto-Submit: Robert Griesemer --- diff --git a/src/cmd/compile/internal/types2/api_test.go b/src/cmd/compile/internal/types2/api_test.go index f23c50ba46..d73e8fa95e 100644 --- a/src/cmd/compile/internal/types2/api_test.go +++ b/src/cmd/compile/internal/types2/api_test.go @@ -764,7 +764,7 @@ func TestUsesInfo(t *testing.T) { // Uses of fields are instantiated. {`package s1; type N[A any] struct{ a A }; var f = N[int]{}.a`, `a`, `field a int`}, - {`package s1; type N[A any] struct{ a A }; func (r N[B]) m(b B) { r.a = b }`, `a`, `field a B`}, + {`package s2; type N[A any] struct{ a A }; func (r N[B]) m(b B) { r.a = b }`, `a`, `field a B`}, // Uses of methods are uses of the instantiated method. {`package m0; type N[A any] int; func (r N[B]) m() { r.n() }; func (N[C]) n() {}`, `n`, `func (m0.N[B]).n()`}, diff --git a/src/go/types/api_test.go b/src/go/types/api_test.go index 0854a119c2..f94fe6be4c 100644 --- a/src/go/types/api_test.go +++ b/src/go/types/api_test.go @@ -763,7 +763,7 @@ func TestUsesInfo(t *testing.T) { // Uses of fields are instantiated. {`package s1; type N[A any] struct{ a A }; var f = N[int]{}.a`, `a`, `field a int`}, - {`package s1; type N[A any] struct{ a A }; func (r N[B]) m(b B) { r.a = b }`, `a`, `field a B`}, + {`package s2; type N[A any] struct{ a A }; func (r N[B]) m(b B) { r.a = b }`, `a`, `field a B`}, // Uses of methods are uses of the instantiated method. {`package m0; type N[A any] int; func (r N[B]) m() { r.n() }; func (N[C]) n() {}`, `n`, `func (m0.N[B]).n()`},