thoughtbot / Perform

Easy dependency injection for storyboard segues
MIT License
280 stars 12 forks source link

Cannot convert value of type '(_) -> ()' to expected argument type 'Any!' #23

Closed VladimirSpasov closed 6 years ago

VladimirSpasov commented 6 years ago

When I try to use the class I get the following error:

Cannot convert value of type '(_) -> ()' to expected argument type 'Any!'

I'm not sure it can be the cause but I'm using Swift 4.

My code is as follows: perform(.embedPromotions) { promotionsVC in promotionsPageController = promotionsVC promotionsPageController.promotionsData = promotionsData }

Any help will be greatly appreciated.

sharplet commented 6 years ago

Hi! Sorry for the delay here. Is this still an issue for you? If so, would you mind sharing the code that defines the embedPromotions segue? It would also be useful to see a little bit more context for the code snippet you provided.

sharplet commented 6 years ago

I'm going to close this for now, but feel free to post again if this is still an issue.