[swift-evolution] Unable to do unnamed binding in swift

James Campbell james at supmenow.com
Mon Feb 8 05:01:13 CST 2016


In Swift 2.1 its possible to do the following:

if let _ = userInfo["msgIdenitifer"] where application.applicationState == .
Active {

//Do something

 }


But not:


switch(userInfo)

{

case let _ = userInfo["msgIdenitifer"] where application.applicationState
== .Active:

//do something

break

}

*___________________________________*

*James⎥Lead Engineer*

*james at supmenow.com <james at supmenow.com>⎥supmenow.com <http://supmenow.com>*

*Sup*

*Runway East *

*10 Finsbury Square*

*London*

* EC2A 1AF *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160208/468e7411/attachment.html>


More information about the swift-evolution mailing list