[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)'* *

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: > >

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

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

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

[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

[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

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