Xcode-beta (7B75): Protocol extension causes Segmentation fault 11
Originator: | GriotSpeak | ||
Number: | rdar://22833487 | Date Originated: | 23-Sep-2015 09:25 PM |
Status: | Open | Resolved: | |
Product: | Developer Tools | Product Version: | Xcode-beta (7B75) |
Classification: | Serious Bug | Reproducible: | Always |
Summary: The provided set of protocols and extensions causes a segmentation fault 11 Steps to Reproduce: 1. paste the following code into a new file in Xcode. 2. Build (The build should succeed.) 3. Uncomment out the extension on Double. 4. Build. (Segmentation fault) /// BEGIN CODE SNIPPET public protocol TimeType : Comparable { typealias Context func absoluteTimeInterval(context:Context) -> AbsoluteTimeInterval } public protocol AbsoluteTimeType : TimeType { var absoluteTimeInterval:AbsoluteTimeInterval { get } } public typealias AbsoluteTimeInterval = Double // Uncomment this method and then buildThe pro //extension Double : AbsoluteTimeType { // public var absoluteTimeInterval: Double { // return self // } //} extension AbsoluteTimeType { typealias Context = Void public func absoluteTimeInterval(context: Void = ()) -> AbsoluteTimeInterval { return absoluteTimeInterval } } /// END CODE SNIPPET Expected Results: A successful build, errors, or warnings. Actual Results: Segmentation fault 11 Regression: No segmentation fault is encountered when building with Xcode 7.0 from the Mac App Store.
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!