Skip to content

Commit 16d1a95

Browse files
committed
Transparent aliases: don't write an invalid type to the @types table on extracting an alias
1 parent 9b91c07 commit 16d1a95

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

go/extractor/extractor.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1656,7 +1656,9 @@ func extractTypeWithFlags(tw *trap.Writer, tp types.Type, transparentAliases boo
16561656
}
16571657
case *types.Alias:
16581658
if transparentAliases {
1659-
extractTypeWithFlags(tw, tp.Rhs(), true)
1659+
// Nothing to do; getTypeLabel will already have looked
1660+
// through the alias, extracted and returned its RHS.
1661+
return lbl
16601662
} else {
16611663
kind = dbscheme.TypeAlias.Index()
16621664
dbscheme.TypeNameTable.Emit(tw, lbl, tp.Obj().Name())

0 commit comments

Comments
 (0)