aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/test
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-08-26 19:18:57 -0700
committerMatthew Dempsky <mdempsky@google.com>2021-08-27 23:06:52 +0000
commita9377183d0f3ccd49631e2d927d55d91f2ab5ec6 (patch)
tree35be85866e6f8ab98219bc5a07932bdab3ca9a54 /src/cmd/compile/internal/test
parent82efc0540386dfaf78aaddfdb617ac90c7554f34 (diff)
downloadgo-a9377183d0f3ccd49631e2d927d55d91f2ab5ec6.tar.xz
cmd/compile/internal/types: unexport New and NewBasic
Now that the universe is fully initialized within package types, we can stop exporting New and NewBasic, which are only needed for that purpose. So this CL renames "New" to "newType" and "NewBasic" to "newBasic". This CL also moves the initialization of Types[TBLANK] and Types[TNIL] from typecheck.InitUniverse to types.InitTypes, which I missed in an earlier CL. And a use of "New(TSTRING)" in test/abiutils_test.go, which should just be "Types[TSTRING]" anyway. Change-Id: I1d83f93e27b88be289d4f3f6c16357a20f570460 Reviewed-on: https://go-review.googlesource.com/c/go/+/345487 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/test')
-rw-r--r--src/cmd/compile/internal/test/abiutils_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/test/abiutils_test.go b/src/cmd/compile/internal/test/abiutils_test.go
index 839546bcb8..f26cb89c6d 100644
--- a/src/cmd/compile/internal/test/abiutils_test.go
+++ b/src/cmd/compile/internal/test/abiutils_test.go
@@ -247,7 +247,7 @@ func TestABIUtilsSliceString(t *testing.T) {
// p6 int64, p6 []intr32) (r1 string, r2 int64, r3 string, r4 []int32)
i32 := types.Types[types.TINT32]
sli32 := types.NewSlice(i32)
- str := types.New(types.TSTRING)
+ str := types.Types[types.TSTRING]
i8 := types.Types[types.TINT8]
i64 := types.Types[types.TINT64]
ft := mkFuncType(nil, []*types.Type{sli32, i8, sli32, i8, str, i8, i64, sli32},