Re: [swift-users] passing command line arguments to `swift test`

2017-05-19 Thread Kelvin Ma via swift-users
i want to be able to run a single test case at a time instead of my whole test suite and i’m currently invoking the test binary directly after doing `swift test` On May 19, 2017, at 4:56 PM, Brent Royal-Gordon wrote: >> On May 18, 2017, at 8:16 AM, Kelvin Ma via swift-users >> wrote: >> >>

Re: [swift-users] Swift 4.0 forEach problem

2017-05-19 Thread Slava Pestov via swift-users
Thanks, do you mind filing a bug at bugs.swift.org ? Slava > On May 19, 2017, at 4:18 PM, Edward Connell via swift-users > wrote: > > In swift 3.1.1 I was able to have the function below, which "gets" an > optional member collection of objects and calls their setModel

[swift-users] Swift 4.0 forEach problem

2017-05-19 Thread Edward Connell via swift-users
In swift 3.1.1 I was able to have the function below, which "gets" an optional member collection of objects and calls their setModel member function. Simple and clean using the forEach method. public func setModel(model: Model) { get()?.forEach { $0.setModel(*model*: model) } } However it no

Re: [swift-users] swift 4.0 "swift-version 4" errors with "type(of:"

2017-05-19 Thread David Hart via swift-users
That's worrisome. type is such a common identifier that I worry its going to break a lot of code, create some confusion and force the un-esthetic qualifying. > On 19 May 2017, at 21:38, Slava Pestov via swift-users > wrote: > > Do you have a member named ‘type’ in the current scope? > > We ch

Re: [swift-users] swift 4.0 "swift-version 4" errors with "type(of:"

2017-05-19 Thread Edward Connell via swift-users
Yes I did, that fixed the problem. Thank you On Fri, May 19, 2017 at 12:38 PM, Slava Pestov wrote: > Do you have a member named ‘type’ in the current scope? > > We changed the behavior of type(of:) so that it behaves like a normal > declaration in the Swift module instead of a special keyword. U

Re: [swift-users] swift 4.0 "swift-version 4" errors with "type(of:"

2017-05-19 Thread Slava Pestov via swift-users
Do you have a member named ‘type’ in the current scope? We changed the behavior of type(of:) so that it behaves like a normal declaration in the Swift module instead of a special keyword. Unfortunately this means if you have a ‘type’ already visible in scope, you have to fully qualify Swift.typ

[swift-users] swift 4.0 "swift-version 4" errors with "type(of:"

2017-05-19 Thread Edward Connell via swift-users
When running the compiler using the "-swift-version 4" flag, the compiler complains about creating a dynamic type. Errors are flagged from within concrete base classes and also within protocol extensions. *error: cannot invoke 'type' with an argument list of type '(of: Self)'* *let

Re: [swift-users] swift 4.0 complains/warns about swapping array elements

2017-05-19 Thread Edward Connell via swift-users
Great! Yes, changing the diagnostic message will save people from having to ask this question. Thanks, Ed On Fri, May 19, 2017 at 10:30 AM, Devin Coughlin wrote: > Hi Ed, > > On May 19, 2017, at 10:10 AM, Edward Connell via swift-users < > swift-users@swift.org> wrote: > > I just switched to th

Re: [swift-users] swift 4.0 complains/warns about swapping array elements

2017-05-19 Thread Devin Coughlin via swift-users
Hi Ed, > On May 19, 2017, at 10:10 AM, Edward Connell via swift-users > wrote: > > I just switched to the 5/17 swift 4.0 tool chain on Linux, and I am getting > the following complaint when using swap on array elements. Is this warning > legitimate because of a copy on write issue? If so, is

Re: [swift-users] swift 4.0 complains/warns about swapping array elements

2017-05-19 Thread David Sweeris via swift-users
> On May 19, 2017, at 10:10, Edward Connell via swift-users > wrote: > > I just switched to the 5/17 swift 4.0 tool chain on Linux, and I am getting > the following complaint when using swap on array elements. Is this warning > legitimate because of a copy on write issue? If so, is there some

[swift-users] swift 4.0 complains/warns about swapping array elements

2017-05-19 Thread Edward Connell via swift-users
I just switched to the 5/17 swift 4.0 tool chain on Linux, and I am getting the following complaint when using swap on array elements. Is this warning legitimate because of a copy on write issue? If so, is there some new swap function for array elements? I realize I can turn 1 line into 3 and do th

[swift-users] Generating html code, best practise?

2017-05-19 Thread Rien via swift-users
I want to generate some HTML code with Swift. Of course there are many way to do this, but I am not looking to do an "in-dept all options open” approach. Just some ‘get the html out quickly” type of thing. So I wonder, how do _you_ do this? Simply using Strings is one option, but cumbersome and