]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: factor out maximum type computation
authorRobert Griesemer <gri@golang.org>
Thu, 4 May 2023 21:09:27 +0000 (14:09 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 5 May 2023 22:31:54 +0000 (22:31 +0000)
commit05ca41d3efdd1fc676bf3ff10afa95f91607eb0a
tree3075a1d1f17f2c88bf46bf6ff6e5e482718a95e5
parent445e520d494aec4f4f34d6a67a0a6231a44fe1b5
go/types, types2: factor out maximum type computation

For untyped constant binary operations we need to determine the
"maximum" (untyped) type which includes both constant types.
Factor out this functionality.

Change-Id: If42bd793d38423322885a3063a4321bd56443b36
Reviewed-on: https://go-review.googlesource.com/c/go/+/492619
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/types2/expr.go
src/cmd/compile/internal/types2/predicates.go
src/go/types/expr.go
src/go/types/predicates.go