diff options
author | Robert Griesemer <gri@golang.org> | 2022-02-09 14:16:05 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2022-02-09 22:58:35 +0000 |
commit | 2bf5ae0c28a28244c3e20ef65b75e9e90adb5251 (patch) | |
tree | ff42086b3c849565763adddb637d8a6ccfafb461 /src/go/types/predicates.go | |
parent | ea3c546e9e2b507d497f8093f8414cb31c112062 (diff) | |
download | go-2bf5ae0c28a28244c3e20ef65b75e9e90adb5251.tar.gz go-2bf5ae0c28a28244c3e20ef65b75e9e90adb5251.zip |
go/types, types2: rename structuralType/String to coreType/String
This is a pure rename of the respective Go functions/methods
with corresponding adjustments to error messages and tests.
A couple of comments were manually rephrased.
With this change, the implementation and error messages match
the latest spec.
No functionality change.
Change-Id: Iaa92a08b64756356fb2c5abdaca5c943c9105c96
Reviewed-on: https://go-review.googlesource.com/c/go/+/384618
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/go/types/predicates.go')
-rw-r--r-- | src/go/types/predicates.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/go/types/predicates.go b/src/go/types/predicates.go index 23dcd7274d..14e99bf426 100644 --- a/src/go/types/predicates.go +++ b/src/go/types/predicates.go @@ -33,7 +33,7 @@ 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 isX is true // for all specified types of the type parameter's type set. -// allX is an optimized version of isX(structuralType(t)) (which +// allX is an optimized version of isX(coreType(t)) (which // is the same as underIs(t, isX)). func allBoolean(typ Type) bool { return allBasic(typ, IsBoolean) } @@ -47,7 +47,7 @@ func allNumericOrString(typ Type) bool { return allBasic(typ, IsNumeric|IsString // allBasic reports whether under(t) is a basic type with the specified info. // If t is a type parameter, the result is true if isBasic(t, info) is true // for all specific types of the type parameter's type set. -// allBasic(t, info) is an optimized version of isBasic(structuralType(t), info). +// allBasic(t, info) is an optimized version of isBasic(coreType(t), info). func allBasic(t Type, info BasicInfo) bool { if tpar, _ := t.(*TypeParam); tpar != nil { return tpar.is(func(t *term) bool { return t != nil && isBasic(t.typ, info) }) |