Skip to content

Commit

Permalink
Validate Map element for struct:pkg:path Meta
Browse files Browse the repository at this point in the history
  • Loading branch information
tchssk committed Feb 1, 2024
1 parent 1eb3d7d commit 066c44b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions expr/attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ func (a *AttributeExpr) validatePkgPath(pkgPath string, t DataType) *eval.Valida
}
if mp := AsMap(t); mp != nil {
verr.Merge(a.validatePkgPath(pkgPath, mp.KeyType.Type))
verr.Merge(a.validatePkgPath(pkgPath, mp.ElemType.Type))
}
if ut, ok := t.(UserType); pkgPath != "" && ok {
// This check ensures we error if a sub-type has a different custom package type set
Expand Down

0 comments on commit 066c44b

Please sign in to comment.