Swift compiler segfaults when calling computed property getter defined on a class extension

Originator:indragiek
Number:rdar://17409615 Date Originated:21-Jun-2014
Status:Open Resolved:No
Product:Developer Tools Product Version:OS X 10.10 (14A261i), Xcode 6.0 (6A216f)
Classification:Crash Reproducible:Always
 
Summary:
When you write code that calls a getter for a computed property defined on a class extension, the Swift compiler segfaults.

Steps to Reproduce:
Reproduction case:

struct SomeStruct {
    let value: String
}
 
extension UIView {
    var ind_someProperty: SomeStruct {
      return SomeStruct(value: "Broken compiler")
    }
}
 
var view = UIView(frame: CGRectZero)
view.ind_someProperty // Crashes the compiler
 
// <unknown>:0: error: unable to execute command: Segmentation fault: 11
// <unknown>:0: error: swift frontend command failed due to signal (use -v to see invocation)
// Command /Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift failed with exit code 254

Expected Results:
Code compiles successfully

Actual Results:
Compiler segfaults with the following messages:

 <unknown>:0: error: unable to execute command: Segmentation fault: 11
<unknown>:0: error: swift frontend command failed due to signal (use -v to see invocation)
Command /Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift failed with exit code 254

Version:
OS X 10.10 (14A261i), Xcode 6.0 (6A216f)

Notes:


Configuration:
Retina MacBook Pro 15" (Mid 2012), 2.3GHz, 16GB RAM

Attachments:

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!