Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix indeterminate ordering in typesToValues() (#4)
Summary: X-link: hhvm/hhvm-staging#4 We depend on the evaluation order of the lambda passed to typesToValues() (in particular we depend on it being called for each element type in the tuple in the order in which they appear in the tuple). In C++ the order in which the values of function parameters are resolved is indeterminate: > In a function call, value computations and side effects of the initialization of every parameter are indeterminately sequenced with respect to value computations and side effects of any other parameter. https://en.cppreference.com/w/cpp/language/eval_order This diff changes `typesToValuesImpl` to use a recursive definition that should have a well-defined order. Reviewed By: ricklavoie, alexeyt Differential Revision: D40489955 fbshipit-source-id: 4342dde6eeda4c1002795e4f7dc2ee41c9879152
- Loading branch information