mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: more Isfoo Type cleanups
Replace isideal(t) with t.IsUntyped(). Replace Istype(t, k) with t.IsKind(k). Replace isnilinter(t) with t.IsEmptyInterface(). Also replace a lot of t.IsKind(TFOO) with t.IsFoo(). Replacements prepared mechanically with gofmt -w -r. Passes toolstash -cmp. Change-Id: Iba48058f3cc863e15af14277b5ff5e729e67e043 Reviewed-on: https://go-review.googlesource.com/21424 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
5dd129bcff
commit
00e5a68c3e
17 changed files with 72 additions and 70 deletions
|
|
@ -918,7 +918,7 @@ func typesymprefix(prefix string, t *Type) *Sym {
|
|||
}
|
||||
|
||||
func typenamesym(t *Type) *Sym {
|
||||
if t == nil || (t.IsPtr() && t.Elem() == nil) || isideal(t) {
|
||||
if t == nil || (t.IsPtr() && t.Elem() == nil) || t.IsUntyped() {
|
||||
Fatalf("typename %v", t)
|
||||
}
|
||||
s := typesym(t)
|
||||
|
|
@ -946,7 +946,7 @@ func typename(t *Type) *Node {
|
|||
}
|
||||
|
||||
func itabname(t, itype *Type) *Node {
|
||||
if t == nil || (t.IsPtr() && t.Elem() == nil) || isideal(t) {
|
||||
if t == nil || (t.IsPtr() && t.Elem() == nil) || t.IsUntyped() {
|
||||
Fatalf("itabname %v", t)
|
||||
}
|
||||
s := Pkglookup(Tconv(t, FmtLeft)+","+Tconv(itype, FmtLeft), itabpkg)
|
||||
|
|
@ -1076,7 +1076,7 @@ func dtypesym(t *Type) *Sym {
|
|||
t = Types[t.Etype]
|
||||
}
|
||||
|
||||
if isideal(t) {
|
||||
if t.IsUntyped() {
|
||||
Fatalf("dtypesym %v", t)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue