Skip to content

Commit

Permalink
fix: don't export types that reference an identical name
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed Nov 20, 2019
1 parent f30fa98 commit 91d0682
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions parser/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ func (p *Parser) parseTypeSpec(spec *ast.TypeSpec) {
}
}

if spec.Name.Name == t {
return
}

p.tMtx.Lock()
defer p.tMtx.Unlock()
p.types = append(p.types, &TypeDef{
Expand Down

0 comments on commit 91d0682

Please sign in to comment.