From 81188661f1fd51f67dfff40c451d4e878b533a66 Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Wed, 8 Sep 2021 00:33:32 +0700 Subject: [PATCH] go/types: do not format TParams when hashing This is a port of CL 347534 to go/types. Change-Id: I2b15a29992c430e34592d110be16d7b2b10521a9 Reviewed-on: https://go-review.googlesource.com/c/go/+/348029 Trust: Cuong Manh Le Run-TryBot: Cuong Manh Le Reviewed-by: Robert Findley TryBot-Result: Go Bot --- src/go/types/typestring.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/go/types/typestring.go b/src/go/types/typestring.go index 3d30ff98f39..c5f0354aeac 100644 --- a/src/go/types/typestring.go +++ b/src/go/types/typestring.go @@ -235,7 +235,7 @@ func (w *typeWriter) typ(typ Type) { if t.targs != nil { // instantiated type w.typeList(t.targs.list()) - } else if t.TParams().Len() != 0 { + } else if !w.hash && t.TParams().Len() != 0 { // For type hashing, don't need to format the TParams // parameterized type w.tParamList(t.TParams().list()) }