Skip to content

Commit 91d0682

Browse files
committed
fix: don't export types that reference an identical name
1 parent f30fa98 commit 91d0682

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

parser/parse.go

+4
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,10 @@ func (p *Parser) parseTypeSpec(spec *ast.TypeSpec) {
234234
}
235235
}
236236

237+
if spec.Name.Name == t {
238+
return
239+
}
240+
237241
p.tMtx.Lock()
238242
defer p.tMtx.Unlock()
239243
p.types = append(p.types, &TypeDef{

0 commit comments

Comments
 (0)