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