How to reproduce:
- In the orchestrator code:
- Add logging for when function arguments are retrieved from the scope.
- Add logging after implementations are collected but before an implementation is selected.
- Evaluate a call to a function with a composition implementation.
Observed behavior: The line about the argument being retrieved is logged before the one about selecting implementations (and is in fact logged multiple times since it is evaluated again once the implementation is selected). Example with the "composition consisting of an argument reference" test:
retrieving argument: Z12421K1 selecting implementation retrieving argument: Z831K1 retrieving argument: Z831K2 selecting implementation retrieving argument: Z831K1 retrieving argument: Z831K2 selecting implementation retrieving argument: Z12421K1 selecting implementation retrieving argument: Z831K1 retrieving argument: Z831K2 selecting implementation retrieving argument: Z831K1 retrieving argument: Z831K2 selecting implementation retrieving argument: Z831K1 retrieving argument: Z831K2
Expected behavior: No line about argument retrieval is logged before selecting the implementation.
In fact, if the scoping was done correctly (T309195), this bug would cause the function evaluation to fail since arguments are retrieved before they are added to the scope.