]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/types: change NewTypeParam to match New{Basic,Named}
authorMatthew Dempsky <mdempsky@google.com>
Tue, 10 May 2022 23:06:16 +0000 (16:06 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 13 May 2022 21:28:41 +0000 (21:28 +0000)
commite99275241c4e4bde6ff2a8598e558a2bea151ef7
treee2aa1f06cbc8dc5d4fcfb4af44dc36e3fd6d7907
parent80f3e3deba619fcf0ddcb547c61c9cbbd8b81968
cmd/compile/internal/types: change NewTypeParam to match New{Basic,Named}

NewBasic and NewNamed take an Object (i.e., *ir.Name), so that callers
don't need to call SetNod. This CL changes NewTypeParam to follow the
same convention. Following up on recent Ntype removal, this allows
getting rid of Type.SetNod entirely.

While here, Type.SetSym is unused too.

Change-Id: Ibe0f5747e2ab4a9512b65142b6d3006704b60bd3
Reviewed-on: https://go-review.googlesource.com/c/go/+/405654
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/noder/types.go
src/cmd/compile/internal/typecheck/iimport.go
src/cmd/compile/internal/types/type.go