mirror of
https://github.com/golang/go
synced 2024-11-26 13:48:05 -07:00
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 <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
2a4845257f
commit
81188661f1
@ -235,7 +235,7 @@ func (w *typeWriter) typ(typ Type) {
|
|||||||
if t.targs != nil {
|
if t.targs != nil {
|
||||||
// instantiated type
|
// instantiated type
|
||||||
w.typeList(t.targs.list())
|
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
|
// parameterized type
|
||||||
w.tParamList(t.TParams().list())
|
w.tParamList(t.TParams().list())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user