Skip to content

Commit

Permalink
Propagate anonymify to type aliases as well.
Browse files Browse the repository at this point in the history
Fixes #505.
  • Loading branch information
nsf committed Mar 24, 2018
1 parent 4166437 commit bc1404c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions decl.go
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,13 @@ func (a *anonymous_typer) Visit(node ast.Node) ast.Visitor {
vs := s.(*ast.ValueSpec)
vs.Type = check_for_anon_type(vs.Type, a.flags, a.scope)
}
case token.TYPE:
for _, s := range t.Specs {
ts := s.(*ast.TypeSpec)
if ts.Assign != token.NoPos {
ts.Type = check_for_anon_type(ts.Type, a.flags, a.scope)
}
}
}
}
return a
Expand Down

0 comments on commit bc1404c

Please sign in to comment.