Resolve is an implementation of the NamespacedAttribute interface method which tests for matching unknown attribute patterns and returns types.Unknown if present. Otherwise, the standard Resolve logic applies.
(vars Activation)
| 366 | // for matching unknown attribute patterns and returns types.Unknown if present. Otherwise, |
| 367 | // the standard Resolve logic applies. |
| 368 | func (m *attributeMatcher) Resolve(vars Activation) (any, error) { |
| 369 | id := m.NamespacedAttribute.ID() |
| 370 | // Bug in how partial activation is resolved, should search parents as well. |
| 371 | partial, isPartial := AsPartialActivation(vars) |
| 372 | if isPartial { |
| 373 | unk, err := m.fac.matchesUnknownPatterns( |
| 374 | partial, |
| 375 | id, |
| 376 | m.CandidateVariableNames(), |
| 377 | m.qualifiers) |
| 378 | if err != nil { |
| 379 | return nil, err |
| 380 | } |
| 381 | if unk != nil { |
| 382 | return unk, nil |
| 383 | } |
| 384 | } |
| 385 | return m.NamespacedAttribute.Resolve(vars) |
| 386 | } |
| 387 | |
| 388 | // Qualify is an implementation of the Qualifier interface method. |
| 389 | func (m *attributeMatcher) Qualify(vars Activation, obj any) (any, error) { |
nothing calls this directly
no test coverage detected