]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: cleanup of code handling type switch cases
authorRobert Griesemer <gri@golang.org>
Thu, 13 Jun 2024 20:54:05 +0000 (13:54 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 26 Jul 2024 20:11:06 +0000 (20:11 +0000)
commitc761174d9618ba1458eb0d149eff4d42e2dc92ae
tree6db69b363087f96d6c803ec3de0978a2621c68de
parentdd005f43f136790c18cbf278863aa531a579040d
go/types, types2: cleanup of code handling type switch cases

Move logic for type-specific variable type into typeCases function
which already does all the relevant work.

Add more detailed documentation to typeCases function.

Uncomment alernative typeCases function so that it is being type-
checked and kept up-to-date. Since it's not (yet) used, the code
will not appear in the binary.

Follow-up on CL 592555.

Change-Id: I6e746503827d512a1dbf7b99b48345c480e61200
Reviewed-on: https://go-review.googlesource.com/c/go/+/592616
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/stmt.go
src/go/types/stmt.go