Skip to content

Split _instancePathToOption into separate resolution functions #636

Description

@AntoineGautier

Part of #620. ConfigContext._instancePathToOption handles path modifiers, member lookup, effective class, record bindings and inner/outer all in one loop, and the effective class is computed differently in five places. #620 changes keys to use the effective class, so that logic must exist in one place first.

  • Split it into applyPathModifiers, memberOption, effectiveClass (selection → redeclare modification → declared type → short-class alias), bindingRedirect, resolveInstance (returns null when a path can't be resolved; cached per context)
  • Replace the other effective-class computations with effectiveClass
  • Equivalence test: for every template and every reachable instance path, the old and new code resolve the same option and value

No behavior change; keys stay as they are.

Acceptance: equivalence test passes on all templates; client tests and golden tests unchanged.

Specification

docs/selection-keys.md, sections "Resolution rules" and "Interpreter structure".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions