File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -1582,18 +1582,10 @@ func isAlias(tp types.Type) bool {
1582
1582
return ok
1583
1583
}
1584
1584
1585
- // If the given type is a type alias, this function resolves it to its underlying type.
1586
- func resolveTypeAlias (tp types.Type ) types.Type {
1587
- if isAlias (tp ) {
1588
- return types .Unalias (tp ) // tp.Underlying()
1589
- }
1590
- return tp
1591
- }
1592
-
1593
1585
// extractType extracts type information for `tp` and returns its associated label;
1594
1586
// types are only extracted once, so the second time `extractType` is invoked it simply returns the label
1595
1587
func extractType (tw * trap.Writer , tp types.Type ) trap.Label {
1596
- tp = resolveTypeAlias (tp )
1588
+ tp = types . Unalias (tp )
1597
1589
lbl , exists := getTypeLabel (tw , tp )
1598
1590
if ! exists {
1599
1591
var kind int
@@ -1771,7 +1763,7 @@ func extractType(tw *trap.Writer, tp types.Type) trap.Label {
1771
1763
// is constructed from their globally unique ID. This prevents cyclic type keys
1772
1764
// since type recursion in Go always goes through defined types.
1773
1765
func getTypeLabel (tw * trap.Writer , tp types.Type ) (trap.Label , bool ) {
1774
- tp = resolveTypeAlias (tp )
1766
+ tp = types . Unalias (tp )
1775
1767
lbl , exists := tw .Labeler .TypeLabels [tp ]
1776
1768
if ! exists {
1777
1769
switch tp := tp .(type ) {
You can’t perform that action at this time.
0 commit comments