aboutsummaryrefslogtreecommitdiff
path: root/src/go/types/api_test.go
diff options
context:
space:
mode:
authorRob Findley <rfindley@google.com>2021-07-16 19:49:43 -0400
committerRobert Findley <rfindley@google.com>2021-07-19 16:51:16 +0000
commit41ff0aac13fd0537702a7f28091a841bef233548 (patch)
tree54f7c3da87a42823ac889f77a08ba094b4c963b0 /src/go/types/api_test.go
parent9e147c55b7a08b487efff3a87a27ed8c463cf347 (diff)
downloadgo-41ff0aac13fd0537702a7f28091a841bef233548.tar.gz
go-41ff0aac13fd0537702a7f28091a841bef233548.zip
[dev.typeparams] go/types: replace types2.Instantiate with Checker.Instantiate
This is a partial port of CL 333569 containing just changes to go/types. Changes to the importer wil be made in a separate CL. Change-Id: I9383e260b76402875ca6eb23c4478a6a3e8c1f0d Reviewed-on: https://go-review.googlesource.com/c/go/+/335071 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/go/types/api_test.go')
-rw-r--r--src/go/types/api_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/go/types/api_test.go b/src/go/types/api_test.go
index 0a91f139fe..444cb44087 100644
--- a/src/go/types/api_test.go
+++ b/src/go/types/api_test.go
@@ -1833,7 +1833,9 @@ func TestInstantiate(t *testing.T) {
}
// instantiation should succeed (no endless recursion)
- res := Instantiate(token.NoPos, T, []Type{Typ[Int]})
+ // even with a nil *Checker
+ var check *Checker
+ res := check.Instantiate(token.NoPos, T, []Type{Typ[Int]}, nil, false)
// instantiated type should point to itself
if res.Underlying().(*Pointer).Elem() != res {