Compiler Segmentation Fault when bridging Obj-C NSArray of blocks to Swift.
Originator: | MichalKaluzny | ||
Number: | rdar://28800505 | Date Originated: | |
Status: | Open | Resolved: | |
Product: | Developer Tools | Product Version: | Version 8.0 (8A218a) |
Classification: | Reproducible: | Always |
Summary: I have a legacy Obj-C class that has a property defined as such: {code: java} typedef void (^CompilerCrashingBlock)(); @interface ObjCFile : NSObject @property NSArray<CompilerCrashingBlock>* blocks; @end {code} {code:java} class SwiftFile { func crash() { let container = ObjCFile() container.blocks = [] } } {code} Trying to assign anything to that property inside Swift code crashes the compiler with attached crash log. Removing the type annotation from the @property fixes the issue. Attached you will find an Xcode project that can be used to reproduce the crash, look into the SwiftFile.swift and ObjcFile.h
Comments
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!