when using a slice of an imported field type, the Underlying still returned the slice rather than the element type.
This commit is contained in:
parent
8d8bd3f891
commit
da53ac99be
|
@ -343,7 +343,7 @@ func getUsedImports(s *types.Struct) map[NamePath]*types.Package {
|
|||
fieldType = p.Elem()
|
||||
}
|
||||
if p, ok := fieldType.(*types.Slice); ok {
|
||||
fieldType = p.Underlying()
|
||||
fieldType = p.Elem()
|
||||
}
|
||||
namedType, ok := fieldType.(*types.Named)
|
||||
if !ok {
|
||||
|
|
Loading…
Reference in New Issue