Swift compiler crash when compiling a simple UIViewController subclass
| Originator: | serieuxchat | ||
| Number: | rdar://21372852 | Date Originated: | 13-Jun-2015 |
| Status: | Closed | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode Version 7.0 beta (7A120f) |
| Classification: | Reproducible: | Always |
Closed as duplicate of 21364764
------------------------------------------------------------------------
Swift compiler crashes when compiling a subclass of UIViewController.
Steps to Reproduce:
Also see attached example project where the following steps were made:
1. Create a singled view based iOS project.
2. Define a UIViewController subclass (call it BaseViewController).
3. Define a subclass of BaseViewController (call it ChildViewController).
4. In BaseViewController implement designated initializers:
init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?)
init(coder aDecoder: NSCoder)
5. In ChildViewController implement the same initializers, but use implicitly unwrapped optional types for nibNameOrNil and nibBundleOrNil
6. Build (e.g. for the Simulator)
The steps above are for explanation purposes. The attached project already contains the sources necessary to reproduce the crash. It does not matter whether building is done for the device or for the Simulator.
Expected Results:
Compiler should complain about the incorrect type of optional in the overridden initializer.
Actual Results:
Compiler crashes
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!