swift
e5fb2764 - [Sema] Continue type-checking `for` body when preamble fails

Commit
140 days ago
[Sema] Continue type-checking `for` body when preamble fails Skipping type-checking the body when the preamble fails to type-check seems to be more of a historical artifact than intentional behavior. Certain elements of the body may still get type-checked through request evaluation, and as such may introduce autoclosures that won't be properly contextualized. Make sure we continue type-checking the body even if the preamble fails. We already invalidate any variables bound in the element pattern, so downstream type-checking should be able to handle it just fine. This ensures autoclosures get contextualized, and that we're still able to provide semantic diagnostics for other issues in the body. rdar://136500008
Author
Committer
Parents
Loading