Merge pull request #324 from lizkammer/fix
Correct bug in generating anonymous nested props
This commit is contained in:
commit
f20c9c3938
1 changed files with 4 additions and 3 deletions
|
@ -161,10 +161,11 @@ func assembleModuleTypeInfo(r *Reader, name string, factory reflect.Value,
|
|||
}
|
||||
nestedName += proptools.PropertyNameForField(nested.Name)
|
||||
nestedProp := ps.GetByName(nestedName)
|
||||
if nestedProp == nil {
|
||||
return nil, fmt.Errorf("could not find nested property %q", nestedName)
|
||||
// Anonymous properties may have already been omitted, no need to ensure they are filtered later
|
||||
if nestedProp != nil {
|
||||
// Set property to anonymous to allow future filtering
|
||||
nestedProp.SetAnonymous()
|
||||
}
|
||||
nestedProp.SetAnonymous()
|
||||
}
|
||||
}
|
||||
mt.PropertyStructs = append(mt.PropertyStructs, ps)
|
||||
|
|
Loading…
Reference in a new issue