mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This was caused by two separate issues: 1. If given a function type with an IUO return, it would add function call completions, set Done=true, and then progress to some logic to add completions for the unwrapped type of optionals. That code would check if the corresponding decl has the IUO attribute set and, if it was but couldn't be unwrapped, assert. For function types, it now early exits after adding call completions. 2. If given the type of a bound (`blah?.`) or forced (`blah!.`) optional, the type is non-optional and can't be unwrapped and the decl still has the IUO so it asserts. Refined the assertion to account for this case. Resolves rdar://problem/38188989.
196 KiB
196 KiB