mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-23 14:35:12 +00:00
![]() When we attempt to bind a type argument to an ability in an alias/opaque instantiation, we create a fresh flex var to represent satisfaction of the ability, and then unify the type argument with that flex var. Previously, we did not register this fresh var in the appropriate rank pool. Usually this is not a problem; however, our generalization algorithm is such that we skip adjusting the rank of redundant variables. Redundant variables are those that are in the same unification tree, but are not the root of the unification trees. This means that if such a flex able var becomes the root of a unification tree with the type argument, and the type argument is itself generalized, we will have missed generalization of the argument. The fix is simple - make sure to register the flex able var into the appropriate rank pool. Closes #4408 |
||
---|---|---|
.. | ||
docs | ||
src | ||
tests | ||
Cargo.toml |