Merge pull request #8268 from hashicorp/fix_hcl2_mapstructure_code
when using a slice of an imported field type, the Underlying still re…
This commit is contained in:
commit
2274f54ef1
|
@ -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