Xcode-7-beta (7A120f): [Playgrounds] Reliable hang when pasting in a valid program

Originator:segiddins
Number:rdar://21472502 Date Originated:19-Jun-2015 08:01 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode-7-beta (7A120f)
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
Xcode hangs when pasting the given valid program into a playground.

Steps to Reproduce:
Paste the following program into a playground

func isSorted<C: CollectionType, T: Comparable where C.Generator.Element == T>(seq: C) -> Bool {
    guard var last = seq.first else { return true }
    for (i, el) in seq.enumerate() {
        if i == 0 { continue }
        let asc: Bool = i % 2 == 1
        if asc && el < last { return false }
        else if el > last { return false }
        last = el
    }
    return true
}

isSorted([1,2,3])

Expected Results:
The program should run

Actual Results:
Xcode hangs

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!