Skip to content

Commit a54340d

Browse files
committed
handle pointer-to-named type definitions
1 parent 2dcbe2e commit a54340d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.go

+4
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,10 @@ func (pkg *pkgData) parseType(obj *types.TypeName) {
747747
}
748748
case *types.Basic:
749749
pkg.Types[name] = typeData{Underlying: elT.Name() + "*"}
750+
case *types.Named:
751+
elTO := elT.Obj()
752+
childName := fmt.Sprintf("%s.%s", elTO.Pkg().Path(), elTO.Name())
753+
pkg.Types[name] = typeData{Underlying: childName + "*"}
750754
default:
751755
doPanic = true
752756
}

0 commit comments

Comments
 (0)