diff options
author | Robert Griesemer <gri@golang.org> | 2021-08-04 15:18:37 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2021-08-06 20:34:43 +0000 |
commit | 5aac85ad5ebfa9c2ecb01a3292bcf3513d876d7a (patch) | |
tree | c058cc9c80087967f248f1e126664cb8ea08307b /src/cmd/compile/internal/types2/instantiate.go | |
parent | 110343e4a2a953a581e34e91e51cef08856b0b0a (diff) | |
download | go-5aac85ad5ebfa9c2ecb01a3292bcf3513d876d7a.tar.gz go-5aac85ad5ebfa9c2ecb01a3292bcf3513d876d7a.zip |
[dev.typeparams] cmd/compile/internal/types2: better names for things (cleanup)
- use the symbol 𝓤 (as in 𝓤niverse) instead of ⊤ to denote the set
of all types (for better readabilty, ⊤ is hard to distinguish from
T in some fonts)
- use isAll instead of isTop to test for the set of all types
- use allTermlist instead of topTermlist to denote the termlist
representing all types
Change-Id: Idcb0b3398782b38653338e65173c0dbb935e430a
Reviewed-on: https://go-review.googlesource.com/c/go/+/339891
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/instantiate.go')
-rw-r--r-- | src/cmd/compile/internal/types2/instantiate.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/types2/instantiate.go b/src/cmd/compile/internal/types2/instantiate.go index b7ea193a06..0bb4ac956b 100644 --- a/src/cmd/compile/internal/types2/instantiate.go +++ b/src/cmd/compile/internal/types2/instantiate.go @@ -174,7 +174,7 @@ func (check *Checker) satisfies(pos syntax.Pos, targ Type, tpar *TypeParam, smap // if iface is comparable, targ must be comparable // TODO(gri) the error messages needs to be better, here if iface.IsComparable() && !Comparable(targ) { - if tpar := asTypeParam(targ); tpar != nil && tpar.iface().typeSet().IsTop() { + if tpar := asTypeParam(targ); tpar != nil && tpar.iface().typeSet().IsAll() { check.softErrorf(pos, "%s has no constraints", targ) return false } |