swift
0e122544 - [CodeCompletion] Fix completion for 'catch' pattern bound values

Commit
1 year ago
[CodeCompletion] Fix completion for 'catch' pattern bound values Previously code completion for 'catch' pattern bound values didn't work correctly because code completion type checker fails to type check the value decl in the pattern. That was because the body of the 'do' statement is not type checked, so the thrown error is not determined, then falled backed to the default 'Never', which doesn't matches any patterns. To resolve this, always type check the body when typechecking 'catch' patterns. Also, pretends 'do {}' throws 'any Error' even without any throwing expressions in the body. rdar://126699879
Author
Committer
Parents
Loading