mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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
1.5 KiB
1.5 KiB