You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, I run dikitgen and I get error below. Closures in function parameter need @escaping.
// Passing non-escaping parameter 'stringFactory' to function expecting an @escaping closure// Parameter 'stringFactory' is implicitly non-escapingfunc resolveSomeModel(stringFactory:(Int)->String)->SomeModel{returnSomeModel(dependency:.init(stringFactory: stringFactory))}
I can avoid this error by creating factory container like below:
When I define a class that conforms to Injectable and has a closure in its Dependency like below:
Then, I run
dikitgen
and I get error below. Closures in function parameter need@escaping
.I can avoid this error by creating factory container like below:
And use like this:
Does anyone know good way to use closure in Dependency?
The text was updated successfully, but these errors were encountered: