aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2021-07-30 14:00:27 -0700
committerKeith Randall <khr@golang.org>2021-07-31 17:03:07 +0000
commit0b8a9ccb25cd9b8f78eb47b1934522af3fb4108f (patch)
treecb79c4ab8790ab8f71fe262dd76eb81e602ce210 /src/cmd/compile/internal/types
parent7bed50e667cf1b4ba5b2ec7ca699c835c696e454 (diff)
downloadgo-0b8a9ccb25cd9b8f78eb47b1934522af3fb4108f.tar.gz
go-0b8a9ccb25cd9b8f78eb47b1934522af3fb4108f.zip
[dev.typeparams] cmd/compile: make all pointer types have the same shape
Except unsafe.Pointer. It has a different Kind, which makes it trickier. Change-Id: I12582afb6e591bea35da9e43ac8d141ed19532a3 Reviewed-on: https://go-review.googlesource.com/c/go/+/338749 Trust: Keith Randall <khr@golang.org> Trust: Dan Scales <danscales@google.com> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Dan Scales <danscales@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types')
-rw-r--r--src/cmd/compile/internal/types/identity.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/types/identity.go b/src/cmd/compile/internal/types/identity.go
index 0a78092f07..dc39acced8 100644
--- a/src/cmd/compile/internal/types/identity.go
+++ b/src/cmd/compile/internal/types/identity.go
@@ -31,7 +31,7 @@ func identical(t1, t2 *Type, cmpTags bool, assumedEqual map[typePair]struct{}) b
if t1.sym != nil || t2.sym != nil {
if t1.HasShape() || t2.HasShape() {
switch t1.kind {
- case TINT8, TUINT8, TINT16, TUINT16, TINT32, TUINT32, TINT64, TUINT64, TINT, TUINT, TUINTPTR, TCOMPLEX64, TCOMPLEX128, TFLOAT32, TFLOAT64, TBOOL, TSTRING, TUNSAFEPTR:
+ case TINT8, TUINT8, TINT16, TUINT16, TINT32, TUINT32, TINT64, TUINT64, TINT, TUINT, TUINTPTR, TCOMPLEX64, TCOMPLEX128, TFLOAT32, TFLOAT64, TBOOL, TSTRING, TPTR, TUNSAFEPTR:
return true
}
// fall through to unnamed type comparison for complex types.