Limit inheritance policy work to the relevant scope
This commit is contained in:
@@ -109,10 +109,11 @@ func (scope identifiedSequenceInheritanceScope) applicationPolicy() sequencePoli
|
||||
func (scope identifiedSequenceInheritanceScope) slotOverhead() int { return 0 }
|
||||
func (scope identifiedSequenceInheritanceScope) templates() []inheritanceExecutionTemplate {
|
||||
result := make([]inheritanceExecutionTemplate, len(scope.graph.nodes))
|
||||
policyIndex := newInheritancePolicyIndex(scope.policies)
|
||||
for index, node := range scope.graph.nodes {
|
||||
result[index] = inheritanceExecutionTemplate{
|
||||
entry: document.Entry{Value: node.item}, path: node.path,
|
||||
collectionPolicies: inheritancePolicyScopeAtPath(scope.policies, node.path),
|
||||
collectionPolicies: policyIndex.localize(node.path),
|
||||
parent: node.parent, hasParent: node.hasParent,
|
||||
hasDirective: node.directive != nil, cancelled: node.cancelled,
|
||||
directive: document.Entry{Value: node.directive}, directivePath: node.directivePath,
|
||||
|
||||
Reference in New Issue
Block a user