Cannot subclass NSInputStream from Swift
| Originator: | christian.noon | ||
| Number: | rdar://19809067 | Date Originated: | 11-Feb-2015 11:00 PM |
| Status: | Closed | Resolved: | 09-Jun-2015 03:31 PM |
| Product: | Developer Tools | Product Version: | Xcode 6.2 Beta 5 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: I cannot successfully subclass an NSInputStream from Swift regardless of what I try. I've attached a simple sample project showing that I cannot successfully override the `init(data:)` initializer. The documentation make it very clear that this should work from Swift, yet it doesn't appear to be possible. I've seen examples of subclasses from Objective-C and have implemented them myself, but I cannot call the default init method from Swift. Steps to Reproduce: Run the example app. Expected Results: CustomStream would initializer properly. Actual Results: CustomStream creation crashes at runtime. Version: Xcode 6.2 Beta 5 ========= Update ============= This has been resolved in the latest Xcode 7 beta.
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!
I can confirm. Xcode Version 6.3.2 (6D2105).