Re: [swift-users] Subclass instance passed to closure expecting parent class “cannot convert value of type to expected argument type”

2016-09-28 Thread Kenny Leung via swift-users
Could it be because ModelListResponse is Generalized while APIResponse is not? -Kenny > On Sep 28, 2016, at 5:43 PM, Eric Conner via swift-users > wrote: > > Hello all! > > I hope it's not frowned upon to repost a question here from Stack Overflow, > but I have not

Re: [swift-users] Updating C-wrapper to Swift 3

2016-09-28 Thread Michael Ilseman via swift-users
> On Sep 28, 2016, at 10:03 AM, John Brownie via swift-users > wrote: > > Thanks for the pointers. Good reading, but I'm still confused. I think that > the first issue is clear to me now, but I don't know what I have to do to > make the closure be seen as satisfying

Re: [swift-users] private vs. fileprivate on global declaration in Swift3?

2016-09-28 Thread Fritz Anderson via swift-users
On 28 Sep 2016, at 9:29 AM, Dave Reed via swift-users wrote: > > They aren't identical. Here's a good explanation: > > http://useyourloaf.com/blog/swift-3-access-controls/ > Useful, but the OP asks about “global”

Re: [swift-users] private vs. fileprivate on global declaration in Swift3?

2016-09-28 Thread Nevin Brackett-Rozinsky via swift-users
To answer the original question: at file scope the access modifiers `private` and `fileprivate` have exactly the same effect. It does not matter which of them you use there. Nevin On Wed, Sep 28, 2016 at 12:14 PM, Marco S Hyman via swift-users < swift-users@swift.org> wrote: > > > On Sep 28,

Re: [swift-users] private vs. fileprivate on global declaration in Swift3?

2016-09-28 Thread Marco S Hyman via swift-users
> On Sep 28, 2016, at 8:04 AM, Jens Alfke via swift-users > wrote: > > >> On Sep 28, 2016, at 12:16 AM, Cao Jiannan via swift-users >> wrote: >> >> I think the Swift team should tell us which is better. > > If one were better than the other,

Re: [swift-users] private vs. fileprivate on global declaration in Swift3?

2016-09-28 Thread Dave Reed via swift-users
> On Sep 28, 2016, at 3:22 AM, Cao Jiannan via swift-users > wrote: > > Should I use private or fileprivate to declare global variables/consts in > Swift 3? e.g. > > fileprivate let a = 1 > fileprivate class SomeClass { > fileprivate b = 0 > } > > or > > private

Re: [swift-users] Updating C-wrapper to Swift 3

2016-09-28 Thread Quinn "The Eskimo!" via swift-users
On 28 Sep 2016, at 07:29, John Brownie via swift-users wrote: > Where can I read up on how to make the conversion? I recommend reading the whole “Migrating to Swift 2.3 or Swift 3 from Swift 2.2” doc, but for this specific issue you should start with the

[swift-users] private vs. fileprivate on global declaration in Swift3?

2016-09-28 Thread Cao Jiannan via swift-users
Should I use private or fileprivate to declare global variables/consts in Swift 3? e.g. fileprivate let a = 1 fileprivate class SomeClass { fileprivate b = 0 } or private let a = 1 private class SomeClass { fileprivate b = 0 } Thanks! If they are identity, then I think the Swift team