aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/builtins_test.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-01-07 12:58:31 -0800
committerRobert Griesemer <gri@golang.org>2021-01-08 17:32:16 +0000
commit0aede1205bdac5d3b938476a6e682190e835bb26 (patch)
tree58ba23ebef96091f831ebc927ca8d6dff7738f60 /src/cmd/compile/internal/types2/builtins_test.go
parent934f9dc0efbae667c445684915676323b98b34d0 (diff)
downloadgo-0aede1205bdac5d3b938476a6e682190e835bb26.tar.gz
go-0aede1205bdac5d3b938476a6e682190e835bb26.zip
[dev.typeparams] cmd/compile/internal/types2: use syntax printer to print expressions
The syntax package has a full-fledged node printer. Use that printer to create the expression strings needed in error messages, and remove the local (essentially) duplicate code for creating expression strings. Change-Id: I03673e5e79b3c1470f8073ebbe840a90fd9053ec Reviewed-on: https://go-review.googlesource.com/c/go/+/282553 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/builtins_test.go')
-rw-r--r--src/cmd/compile/internal/types2/builtins_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/types2/builtins_test.go b/src/cmd/compile/internal/types2/builtins_test.go
index 9f737bc9bb..0fc7c17d3e 100644
--- a/src/cmd/compile/internal/types2/builtins_test.go
+++ b/src/cmd/compile/internal/types2/builtins_test.go
@@ -176,7 +176,7 @@ func testBuiltinSignature(t *testing.T, name, src0, want string) {
// the recorded type for the built-in must match the wanted signature
typ := types[fun].Type
if typ == nil {
- t.Errorf("%s: no type recorded for %s", src0, ExprString(fun))
+ t.Errorf("%s: no type recorded for %s", src0, syntax.ShortString(fun))
return
}
if got := typ.String(); got != want {