mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.regabi] cmd/compile: use *ir.Name instead of ir.Node for CaseClause.Var
Passes toolstash -cmp. Change-Id: Ib0b6ebf5751ffce2c9500dc67d78e54937ead208 Reviewed-on: https://go-review.googlesource.com/c/go/+/279449 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
37babc97bb
commit
850aa7c60c
6 changed files with 12 additions and 8 deletions
|
|
@ -440,7 +440,7 @@ type typeClause struct {
|
|||
body ir.Nodes
|
||||
}
|
||||
|
||||
func (s *typeSwitch) Add(pos src.XPos, typ *types.Type, caseVar, jmp ir.Node) {
|
||||
func (s *typeSwitch) Add(pos src.XPos, typ *types.Type, caseVar *ir.Name, jmp ir.Node) {
|
||||
var body ir.Nodes
|
||||
if caseVar != nil {
|
||||
l := []ir.Node{
|
||||
|
|
@ -450,7 +450,7 @@ func (s *typeSwitch) Add(pos src.XPos, typ *types.Type, caseVar, jmp ir.Node) {
|
|||
typecheck.Stmts(l)
|
||||
body.Append(l...)
|
||||
} else {
|
||||
caseVar = ir.BlankNode
|
||||
caseVar = ir.BlankNode.(*ir.Name)
|
||||
}
|
||||
|
||||
// cv, ok = iface.(type)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue