Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes a bug in lazy constraint expansion. When performing type inference for a field access expression (`x.f`), we generate a lazy constraint with an branch per each struct type that has a field named `n`. We expand the constraint as soon as we know the name of the struct, at which point we can prune all incorrect options. However, the code incorrectly assumed that the field type is also fully concretized at this point, which is generally not true, as type arguments may still be unknown types. The fix doesn't attempt to concretize the field completely, but instead simply substitutes what we know about type arguments at this point. Fixes vmware#1022. Signed-off-by: Leonid Ryzhyk <[email protected]>
- Loading branch information