swift
14219597 - [CSGen] Check whether parent has a contextual type before diagnosing `nil` use

Commit
5 years ago
[CSGen] Check whether parent has a contextual type before diagnosing `nil` use Before considering `nil` to be used without a context, let's check whether parent expression (semantic significance of which is not important) has a contextual type associated with it, otherwise it's possible to misdiagnose cases like: ```swift func test() -> Int? { return (nil) } ``` (cherry picked from commit 90e6fd47923e60f0ceb45c798c05a4d277adb696)
Author
Committer
Parents
Loading