Skip to content

Commit

Permalink
fix: fix frugal tag for typedef container (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
simon0-o authored Aug 11, 2022
1 parent 1ff03f3 commit 863f317
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions generator/golang/frugal.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ func (r *FrugalResolver) getTypeName(g *Scope, t *parser.Type) (name string, err
if _, ok := baseTypes[t.Name]; ok {
return t.Name, nil
}
if isContainerTypes[t.Name] {
g, ut, name := getUnderlay(g, t)
t = ut
if isContainerTypes[name] {
return r.getContainerTypeName(g, t)
}
g, ut, name := getUnderlay(g, t)

if name == "" {
return "", fmt.Errorf("getTypeName failed: type[%v] file[%s]", t, g.ast.Filename)
Expand Down

0 comments on commit 863f317

Please sign in to comment.