Re: [swift-users] Two Obj-C visible functions no longer overload?

2016-08-08 Thread Jon Shier via swift-users
Jordan: Could you expand on allowing making arrays of errors? AFAIK, making arrays of ErrorProtocol/ErrorType/Error has always been possible. And somewhat coincidentally I ran into a runtime issue with the same library, fixed in the latest Swift trunk package, that would result in a cras

Re: [swift-users] SCNetworkReachabilityFlags beta 4 issue

2016-08-08 Thread Jordan Rose via swift-users
In master I’m seeing it at least be consistent, warning about both members and not just ‘isLocalAddress’. Since it seems to be a compiler issue I think just filing it at bugs.swift.org is fine, though I’ll warn you that since there’s an easy workaround it might not get prioritized. Jordan > O

Re: [swift-users] Set size of byte array

2016-08-08 Thread Dave Abrahams via swift-users
on Fri Aug 05 2016, KS Sreeram wrote: >> On 05-Aug-2016, at 1:19 PM, Daniel Vollmer wrote: >> >> I’m by no means a Swift expert (not even a user at the moment), but I don't >> see a way to do this either. The best that comes to mind is initializing a >> ContiguousArray with the sufficient capa

Re: [swift-users] Two Obj-C visible functions no longer overload?

2016-08-08 Thread Jordan Rose via swift-users
I would definitely expect these two to conflict, so if they previously compiled happily I would guess that’s a bug we fixed. The most likely possibility is that we didn’t allow making arrays of errors and now we do. Jordan > On Aug 5, 2016, at 14:57, Jon Shier via swift-users > wrote: > > S

Re: [swift-users] Two Obj-C visible functions no longer overload?

2016-08-08 Thread Quinn "The Eskimo!" via swift-users
On 5 Aug 2016, at 22:57, Jon Shier via swift-users wrote: > Now, if I mark one of the functions @nonobjc, it compiles. So is this a bug > or change in behavior? NSOperation has a property with `-finished:` as the setter and `-isFinished` as the getter. It’s not uncommon for method names use

Re: [swift-users] Protocol with instance var that's set on construction, otherwise read-only

2016-08-08 Thread Rick Mann via swift-users
> On Aug 3, 2016, at 03:23 , Dan Loewenherz wrote: > > On Wed, Aug 3, 2016 at 3:51 AM, Rick Mann via swift-users > wrote: > > > On Aug 2, 2016, at 19:06 , Jordan Rose wrote: > > > > I don’t think it makes sense to do this. A protocol cannot control how a > > particular property is implement

Re: [swift-users] XCTest from repl

2016-08-08 Thread Brian Gesiak via swift-users
Lou, Wow, this is awesome!! Excellent work. I have a few ideas as to why you’re not actually seeing any tests run: 1. swift-corelibs-xctest expects users to run tests via the XCTMain() function

[swift-users] XCTest from repl

2016-08-08 Thread Lou Zell via swift-users
Greetings, I am close to getting XCTests running in the swift repl, but for some reason my tests are never invoked. Does anyone have a suggestion or see something wrong with the test setup? $ xcrun swift -F /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Libra

Re: [swift-users] Chaining struct-mutating funcs

2016-08-08 Thread Dave Abrahams via swift-users
on Fri Aug 05 2016, Joe Groff wrote: > Since your backing buffer is copy-on-write, you can do the in-place > mutation optimization in your immutable implementations, something > like this: > > class C { > var value: Int > init(value: Int) { self.value = value } > } > > struct S { var c: C }