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
|
|
@ -131,7 +131,7 @@ func Import(in *bufio.Reader) {
|
|||
}
|
||||
|
||||
func idealType(typ *Type) *Type {
|
||||
if isideal(typ) {
|
||||
if typ.IsUntyped() {
|
||||
// canonicalize ideal types
|
||||
typ = Types[TIDEAL]
|
||||
}
|
||||
|
|
@ -519,7 +519,7 @@ func (p *importer) value(typ *Type) (x Val) {
|
|||
}
|
||||
|
||||
// verify ideal type
|
||||
if isideal(typ) && untype(x.Ctype()) != typ {
|
||||
if typ.IsUntyped() && untype(x.Ctype()) != typ {
|
||||
Fatalf("importer: value %v and type %v don't match", x, typ)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue