aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/predicates.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-10-25 20:54:05 -0700
committerRobert Griesemer <gri@golang.org>2021-10-27 20:24:48 +0000
commita155a307fbeda88fd44c5399d4fb7ea9e34db545 (patch)
tree47283c1ddd92caa6cace85de1fae4d2261577306 /src/cmd/compile/internal/types2/predicates.go
parentd611f092001f76942251f68023dba137b8a3e821 (diff)
downloadgo-a155a307fbeda88fd44c5399d4fb7ea9e34db545.tar.gz
go-a155a307fbeda88fd44c5399d4fb7ea9e34db545.zip
cmd/compile/internal/types2: clean up asT converters (step 2 of 2)
This CL renames the toT converters back to their asT names. Change-Id: If4bda5a78525f9722f044f5544f400fa8bb6f437 Reviewed-on: https://go-review.googlesource.com/c/go/+/358774 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/predicates.go')
-rw-r--r--src/cmd/compile/internal/types2/predicates.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/types2/predicates.go b/src/cmd/compile/internal/types2/predicates.go
index f89575b24c..4faa09ebd0 100644
--- a/src/cmd/compile/internal/types2/predicates.go
+++ b/src/cmd/compile/internal/types2/predicates.go
@@ -56,7 +56,7 @@ func isNumericOrString(typ Type) bool { return is(typ, IsNumeric|IsString) }
// are not fully set up.
func isTyped(typ Type) bool {
// isTyped is called with types that are not fully
- // set up. Must not call toBasic()!
+ // set up. Must not call asBasic()!
t, _ := typ.(*Basic)
return t == nil || t.info&IsUntyped == 0
}
@@ -70,13 +70,13 @@ func isOrdered(typ Type) bool { return is(typ, IsOrdered) }
func isConstType(typ Type) bool {
// Type parameters are never const types.
- t := toBasic(typ)
+ t := asBasic(typ)
return t != nil && t.info&IsConstType != 0
}
// IsInterface reports whether typ is an interface type.
func IsInterface(typ Type) bool {
- return toInterface(typ) != nil
+ return asInterface(typ) != nil
}
// Comparable reports whether values of type T are comparable.