aboutsummaryrefslogtreecommitdiff
path: root/src/go/types/predicates.go
diff options
context:
space:
mode:
authorRobert Findley <rfindley@google.com>2021-11-09 10:20:50 -0500
committerRobert Findley <rfindley@google.com>2021-11-09 16:23:19 +0000
commit2ade8ae325e6410f9696f431e6c50479216e63ae (patch)
tree925f2bd14fe7ecab7b5e60d51af05fc47b56f4c6 /src/go/types/predicates.go
parente90fd9a597c03b993f900e4b1997de67b12bb4f3 (diff)
downloadgo-2ade8ae325e6410f9696f431e6c50479216e63ae.tar.gz
go-2ade8ae325e6410f9696f431e6c50479216e63ae.zip
go/types: rename is_X predicates back to isX (step 2 of 2)
This is a port of CL 361134 to go/types. Change-Id: Ibac4365a85561b32a90b0118d48aa9302f227b2e Reviewed-on: https://go-review.googlesource.com/c/go/+/362554 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/go/types/predicates.go')
-rw-r--r--src/go/types/predicates.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/go/types/predicates.go b/src/go/types/predicates.go
index 4ca962e77e..1ecb6a8c7e 100644
--- a/src/go/types/predicates.go
+++ b/src/go/types/predicates.go
@@ -27,18 +27,18 @@ func isGeneric(typ Type) bool {
return named != nil && named.obj != nil && named.targs == nil && named.TypeParams() != nil
}
-// The is_X predicates below report whether t is an X.
+// The isX predicates below report whether t is an X.
// If t is a type parameter the result is false; i.e.,
// these predicates don't look inside a type parameter.
-func is_Boolean(t Type) bool { return isBasic(t, IsBoolean) }
-func is_Integer(t Type) bool { return isBasic(t, IsInteger) }
-func is_Unsigned(t Type) bool { return isBasic(t, IsUnsigned) }
-func is_Float(t Type) bool { return isBasic(t, IsFloat) }
-func is_Complex(t Type) bool { return isBasic(t, IsComplex) }
-func is_Numeric(t Type) bool { return isBasic(t, IsNumeric) }
-func is_String(t Type) bool { return isBasic(t, IsString) }
-func is_IntegerOrFloat(t Type) bool { return isBasic(t, IsInteger|IsFloat) }
+func isBoolean(t Type) bool { return isBasic(t, IsBoolean) }
+func isInteger(t Type) bool { return isBasic(t, IsInteger) }
+func isUnsigned(t Type) bool { return isBasic(t, IsUnsigned) }
+func isFloat(t Type) bool { return isBasic(t, IsFloat) }
+func isComplex(t Type) bool { return isBasic(t, IsComplex) }
+func isNumeric(t Type) bool { return isBasic(t, IsNumeric) }
+func isString(t Type) bool { return isBasic(t, IsString) }
+func isIntegerOrFloat(t Type) bool { return isBasic(t, IsInteger|IsFloat) }
// isBasic reports whether under(t) is a basic type with the specified info.
// If t is a type parameter the result is false; i.e.,
@@ -49,10 +49,10 @@ func isBasic(t Type, info BasicInfo) bool {
}
// The allX predicates below report whether t is an X.
-// If t is a type parameter the result is true if is_X is true
+// If t is a type parameter the result is true if isX is true
// for all specified types of the type parameter's type set.
-// allX is an optimized version of is_X(structure(t)) (which
-// is the same as underIs(t, is_X)).
+// allX is an optimized version of isX(structure(t)) (which
+// is the same as underIs(t, isX)).
func allBoolean(typ Type) bool { return allBasic(typ, IsBoolean) }
func allInteger(typ Type) bool { return allBasic(typ, IsInteger) }