Skip to content

Commit

Permalink
Merge pull request #91 from jakubvano/swinject_2.3_compatibility
Browse files Browse the repository at this point in the history
Fix Swift4 compilation
  • Loading branch information
jakubvano authored Mar 29, 2018
2 parents 8536924 + c984511 commit bd35b52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/SwinjectStoryboard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ public class SwinjectStoryboard: _SwinjectStoryboardBase, SwinjectStoryboardProt
// https://github.com/Swinject/Swinject/issues/10
if let container = container.value as? _Resolver {
let option = SwinjectStoryboardOption(controllerType: type(of: viewController))
typealias FactoryType = (Resolver, Container.Controller) -> Any
let _ = container._resolve(name: registrationName, option: option) { (factory: FactoryType) in factory(self.container.value, viewController) } as Container.Controller?
typealias FactoryType = ((Resolver, Container.Controller)) -> Any
let _ = container._resolve(name: registrationName, option: option) { (factory: FactoryType) in factory((self.container.value, viewController)) as Any } as Container.Controller?
} else {
fatalError("A type conforming Resolver protocol must conform _Resolver protocol too.")
}
Expand Down

0 comments on commit bd35b52

Please sign in to comment.