]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/types2: simplify Named.under
authorRob Findley <rfindley@google.com>
Wed, 11 Aug 2021 17:36:26 +0000 (13:36 -0400)
committerRobert Findley <rfindley@google.com>
Sat, 14 Aug 2021 15:14:49 +0000 (15:14 +0000)
commit2d250043b4c5095f326ab72741d557fe74e4e3a6
treeeed9ca801a1e547d8bb65515cc651fc684a1dda3
parent50f4ebbdd30f53272b5f42ab66c50939eade0a0e
cmd/compile/internal/types2: simplify Named.under

Remove some unnecessary logic from Named.under:
 - no need to have special handling for Typ[Invalid]: this is the same
   as other cases where the underlying type is resolved.
 - use Underlying() to get the loaded and expanded underlying
 - no need for special handling of the first iteration

Change-Id: I2029711f51fa9eaaee11debadd55974a1376a980
Reviewed-on: https://go-review.googlesource.com/c/go/+/341857
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/types2/named.go