swift
eaf0532a - [Diagnostics] Relax contextual type presence from assertion to a check

Commit
2 years ago
[Diagnostics] Relax contextual type presence from assertion to a check In some situations `getContextualType` for a contextual type locator is going to return then empty type. This happens because e.g. optional-some patterns and patterns with incorrect type don't have a contextual type for initialization expression but use a conversion with contextual locator nevertheless to indicate the purpose. This doesn't affect non-ambiguity diagnostics because mismatches carry both `from` and `to` types. Resolves: rdar://problem/103739206
Author
Committer
Parents
Loading