Certain generic types reliably crash Swift compiler

Number:rdar://17557409 Date Originated:03-Jul-2014 05:50 PM
Status: Resolved:
Product:Developer tools Product Version:Xcode 6 beta 2
Classification:Crash Reproducible:Always
When attempting to compile or interpret a Swift file with a function taking a certain generic type, the compiler will reliably crash.

Steps to Reproduce:
Attempt to compile or interpret the attached CrashMe.swift file.

Expected Results:
The file will compile or execute, or errors will be displayed as appropriate.

Actual Results:
The compiler reliably crashes. If the code is placed in an Xcode playground, Xcode crashes.

Xcode 6 beta 2, OS X 10.9.3


Xcode 6 beta 2, OS X 10.9.3, 17" Early 2011 MBP

'swift_2014-07-03-174719_alaska.crash', 'swift_2014-07-03-174722_alaska.crash' and 'CrashMe.swift' were successfully uploaded.


Beta 3

Still crashes.

By wjlafrance at July 8, 2014, 8:57 p.m. (reply...)

Complete contents of CrashMe.swift

protocol MyProtocol {
    func methodFromProtocol()

class MyClass {
    func methodFromClass() {
        println("hello class")

class MyClassImplementingMyProtocol : MyClass, MyProtocol {
    func methodFromProtocol() {
        println("hello protocol")

func doThing<T: MyClass where T: MyProtocol>(myThing: T) {

By wjlafrance at July 3, 2014, 10:51 p.m. (reply...)

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!