diff options
author | Rob Findley <rfindley@google.com> | 2023-07-11 15:54:48 -0400 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2023-07-17 21:22:16 +0000 |
commit | d983be9cb54de1cde85ba7946bf30c8013cdf5f3 (patch) | |
tree | 09f8893402f9b1255f2ca01637a6234d5c83e735 | |
parent | 9b335433396088d2701e8a058ae107689404ec6a (diff) | |
download | go-d983be9cb54de1cde85ba7946bf30c8013cdf5f3.tar.gz go-d983be9cb54de1cde85ba7946bf30c8013cdf5f3.zip |
go/types, types2: remove unnecessary assert on pointer size
As described in #61249, uncommon pointer sizes do exist. Remove an
unnecessary assertion.
Fixes #61249
Change-Id: Ib15857bd6bcd42ec530817a132bb8db036236c3b
Reviewed-on: https://go-review.googlesource.com/c/go/+/508821
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
-rw-r--r-- | src/cmd/compile/internal/types2/const.go | 1 | ||||
-rw-r--r-- | src/go/types/const.go | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/types2/const.go b/src/cmd/compile/internal/types2/const.go index 9be578c647..af27c727dd 100644 --- a/src/cmd/compile/internal/types2/const.go +++ b/src/cmd/compile/internal/types2/const.go @@ -73,7 +73,6 @@ func representableConst(x constant.Value, check *Checker, typ *Basic, rounded *c sizeof := func(T Type) int64 { s := conf.sizeof(T) - assert(s == 4 || s == 8) return s } diff --git a/src/go/types/const.go b/src/go/types/const.go index 66fa60804f..bffea146a0 100644 --- a/src/go/types/const.go +++ b/src/go/types/const.go @@ -74,7 +74,6 @@ func representableConst(x constant.Value, check *Checker, typ *Basic, rounded *c sizeof := func(T Type) int64 { s := conf.sizeof(T) - assert(s == 4 || s == 8) return s } |