Swift closures with inout parameters crash the compiler

Originator:gwendal.roue
Number:rdar://18847868 Date Originated:2/11/2014
Status:Open Resolved:
Product:Developper Tools Product Version:Xcode Version 6.1 (6A1052d)
Classification:Crash Reproducible:Always
 
Summary:
Despite the fact that documentation states that "Closure expression syntax can use constant parameters, variable parameters, and inout parameters" at https://developer.apple.com/library/mac/documentation/Swift/Conceptual/Swift_Programming_Language/Closures.html, closures with inout parameter actually crash the compiler.

Steps to Reproduce:
Run the following code:

let closure = { (inout a: Int) -> (Bool) in
    return true
}

var a:Int = 1
closure(&a)


Expected Results:
There is no compiler crash.

Actual Results:
There is a compiler crash.

Version:
Xcode Version 6.1 (6A1052d)

Notes:


Configuration:
OSX 10.10 (14A389)

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!