Re: [swift-users] Closure typing changed in Swift 3

2016-09-09 Thread Rick Mann via swift-users
I figured it out. The real problem is that .json accepts AnyObject, and the Dictionary is not AnyObject (not sure what this change is, since it worked in Swift 2). Anyway, that confused the type inference, which resulted in the red herring error message about the closure assignment. > On Sep 9

[swift-users] Swift 3.0 GM Candidate for Ubuntu

2016-09-09 Thread Chris Lattner via swift-users
I’m not sure if this got mentioned anywhere yet, but the Swift 3.0 GM candidate build is now up for Ubuntu: https://swift.org/download/#releases -Chris (just the messenger, not the person who did all the hard work to make this happen!) ___ swift-users

Re: [swift-users] Argument type 'Int' does not conform to expected type 'AnyObject'

2016-09-09 Thread Roderick Mann via swift-users
> On Sep 9, 2016, at 15:46 , Joe Groff wrote: > > >> On Sep 9, 2016, at 2:02 PM, Kevin Nattinger via swift-users >> wrote: >> >> You’ll need to explicitly add the “as NSNumber” now. >> >> https://github.com/apple/swift-evolution/blob/master/proposals/0072-eliminate-implicit-bridging-convers

Re: [swift-users] Argument type 'Int' does not conform to expected type 'AnyObject'

2016-09-09 Thread Joe Groff via swift-users
> On Sep 9, 2016, at 2:02 PM, Kevin Nattinger via swift-users > wrote: > > You’ll need to explicitly add the “as NSNumber” now. > > https://github.com/apple/swift-evolution/blob/master/proposals/0072-eliminate-implicit-bridging-conversions.md Or even better, you should now be able to use `Any

[swift-users] Closure typing changed in Swift 3

2016-09-09 Thread Rick Mann via swift-users
I have some code that implements an HTTP server. You use it like this: server["/some/path"] = { inReq in return .ok(.json(["key" : "value"])) } ".ok" is a case in the HttpResponse enum. The subscript on "server" above looks like this: class HttpServer { typealias Handler = (HttpRequest)

Re: [swift-users] Argument type 'Int' does not conform to expected type 'AnyObject'

2016-09-09 Thread Kevin Nattinger via swift-users
You’ll need to explicitly add the “as NSNumber” now. https://github.com/apple/swift-evolution/blob/master/proposals/0072-eliminate-implicit-bridging-conversions.md > On Sep 9, 2016,

[swift-users] Argument type 'Int' does not conform to expected type 'AnyObject'

2016-09-09 Thread Rick Mann via swift-users
I've seen old (pre-Swift 3) posts online (e.g. http://stackoverflow.com/questions/28920232/why-do-integers-not-conform-to-the-anyobject-protocol) that address this, but my code worked yesterday before I used Xcode 8 GM to migrate it to Swift 3, and now it doesn't, so I'm trying to understand wha

Re: [swift-users] Migrating to Swift 3 using Xcode fails

2016-09-09 Thread Saagar Jha via swift-users
Thanks, I’ve filed rdar://problem/28230945 with the xcodeproj. Saagar Jha > On Sep 9, 2016, at 10:03, Jordan Rose wrote: > > Xcode and migration aren't part of the Swift open source project, but this is > something I've heard other people complaining about. Can you please file a > Radar i

Re: [swift-users] Migrating to Swift 3 using Xcode fails

2016-09-09 Thread Jordan Rose via swift-users
Xcode and migration aren't part of the Swift open source project, but this is something I've heard other people complaining about. Can you please file a Radar if you haven't already (bugreport.apple.com) and include your project file, then send me the bug number? (For this particular issue, I th