[ConstraintSystem] Dependent member simplification should be attempte… #63947
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…d if it has type variable in any position
Current logic attempts simplification of the base type only if it's a type variable or a dependent member type. That's valid for correct code but not for invalid code e.g.
(($T) -> Void).Element
is not going to be simplified even if$T
is bound, which causes crashes in diagnostic mode becausematchTypes
is going to re-introduce constraint with partially resolved dependent member types and by doing so make it stale forever which trips constraint system state verification logic.Resolves: rdar://105149979