mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile/internal/gc: remove a bunch of uses of typenod
Passes toolstash-check -all. Change-Id: Ic9eb0c52bedac185ab86cc62207f199d93700344 Reviewed-on: https://go-review.googlesource.com/39795 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
25fc842f17
commit
2e1b42a814
4 changed files with 22 additions and 20 deletions
|
|
@ -182,10 +182,10 @@ func typecheckswitch(n *Node) {
|
|||
nvar := ncase.Rlist.First()
|
||||
if ll.Len() == 1 && ll.First().Type != nil && !ll.First().Type.IsKind(TNIL) {
|
||||
// single entry type switch
|
||||
nvar.Name.Param.Ntype = typenod(ll.First().Type)
|
||||
nvar.Type = ll.First().Type
|
||||
} else {
|
||||
// multiple entry type switch or default
|
||||
nvar.Name.Param.Ntype = typenod(n.Type)
|
||||
nvar.Type = n.Type
|
||||
}
|
||||
|
||||
nvar = typecheck(nvar, Erv|Easgn)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue