Skip to content

Commit ee3ccbc

Browse files
authored
fix:(go) type-alias should be regarded as named (#43)
1 parent 6d9118a commit ee3ccbc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lang/golang/parser/utils.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ func getNamedTypes(typ types.Type) (tys []types.Object, isPointer bool, isNamed
230230
typs, _, _ := getNamedTypes(t.Constraint())
231231
tys = append(tys, typs...)
232232
case *types.Alias:
233-
typs, _, _ := getNamedTypes(t.Rhs())
233+
var typs []types.Object
234+
typs, isPointer, isNamed = getNamedTypes(t.Rhs())
234235
tys = append(tys, typs...)
235236
case *types.Signature:
236237
for i := 0; i < t.Params().Len(); i++ {

0 commit comments

Comments
 (0)