Swift 2 and ObjC interoperability crash

Originator:infimache
Number:rdar://22911182 Date Originated:30-9-2015
Status:Closed Resolved:Yes
Product:Developer Tools Product Version:Xcode 7.0
Classification:Other Bug Reproducible:Always
 
Summary:
When you define a method in ObjC which takes as parameter a block with nonnull return value, and call it from Swift 2 program will crash.

Steps to Reproduce:
1. Compile & run attached project with Xcode 7

Expected Results:
App runs without a crash

Actual Results:
App crashes

Version:
Xcode 7.0 (7A220)
OS X Yosemite 10.10.4

Notes:


Configuration:
This occurs when using Swift 2 and nullability annotated ObjC method with nonnull return value of given block.

This does not occur if using Swift 1.2.
This does not occur if using ObjC method without nullability annotations.
This does not occur if block has nullable return value.

Attachments:
'Archive.zip' was successfully uploaded.

Comments

Resolved with Xcode 7.3.1

By infimache at May 13, 2016, 6:21 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!