mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
An async @objc method only checks if its completion handler parameter is null if ClangImporter forces it to. This is fine for @objc with a generated header, because the generated header always declares the parameter _Nonnull, but clients ignore that annotation and pass nil anyway often enough that for @objc @implementation, we ought to be defensive. We can achieve this by simply making the completion handler’s type Optional—SILGen already looks for this and knows what to do when it sees it. Fixes rdar://130527373.
1.0 KiB
1.0 KiB