Protect against nil parent attribute
in case a child has a non inherited attribute.
@@ -663,6 +663,7 @@ func (a *AttributeExpr) inheritRecursive(parent *AttributeExpr, seen map[*Attrib
for _, nat := range *AsObject(att.Type) {
child := nat.Attribute
parent := AsObject(patt.Type).Attribute(nat.Name)
+ if parent != nil {
child.inheritValidations(parent)
child.inheritRecursive(parent, seen)
}
@@ -670,6 +671,7 @@ func (a *AttributeExpr) inheritRecursive(parent *AttributeExpr, seen map[*Attrib
}
}
}
+}
func (a *AttributeExpr) inheritValidations(parent *AttributeExpr) {
if parent.Validation == nil {
