swift
0a75a079 - [CSSolver] Don't drop bindings with type variables while applying solutions

Commit
2 years ago
[CSSolver] Don't drop bindings with type variables while applying solutions If a (partial) solution has a type variable it could only be unbound if `FreeTypeVariableBinding` is set to `Allow`, in all other cases solution would either have a fully resolved type or a hole. `applySolution` shouldn't second guess `finalize()` and just apply a solution as given. This is very important for multi-statement closures because their elements are solved in isolation and opaque value types inferred for their result could contain not-yet-resolved type variables from outer context in their substitution maps (which it totally legal under bi-directional inference).
Author
Committer
Parents
Loading