mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: use t.IsFoo() instead of t.Etype == TFOO
CL produced mechanically using gofmt -w -r. Passes toolstash -cmp. Change-Id: Ib2e8710ebd844e2149125b41c335b71a02fcab53 Reviewed-on: https://go-review.googlesource.com/21338 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
d8f1f8d856
commit
3efefd9395
21 changed files with 95 additions and 95 deletions
|
|
@ -1033,7 +1033,7 @@ func anylit(ctxt int, n *Node, var_ *Node, init *Nodes) {
|
|||
anylit(ctxt, n.Left, var_, init)
|
||||
|
||||
case OSTRUCTLIT:
|
||||
if t.Etype != TSTRUCT {
|
||||
if !t.IsStruct() {
|
||||
Fatalf("anylit: not struct")
|
||||
}
|
||||
|
||||
|
|
@ -1117,7 +1117,7 @@ func anylit(ctxt int, n *Node, var_ *Node, init *Nodes) {
|
|||
arraylit(ctxt, 3, n, var_, init)
|
||||
|
||||
case OMAPLIT:
|
||||
if t.Etype != TMAP {
|
||||
if !t.IsMap() {
|
||||
Fatalf("anylit: not map")
|
||||
}
|
||||
maplit(ctxt, n, var_, init)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue