Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Merge custom context in correct order
When adding a variable to a custom context then the variable is wrapped in a static context and both contexts are combined. The combined context contains all variables in the order: custom context and then static context with new variable. On accessing a variable from the combined context, it looks for the variable in the custom context first. As a result, the new variable can't be accessed if a variable with the same name exists in the custom context. The behavior is different for a static context. The new variable is added to the static context and overrides a previous variable with the same name. Align the behavior for a custom context with the behavior of a static context. A new variable should override/shadow an existing variable. (cherry picked from commit 626aa4d)
- Loading branch information