Swift compilation issue that took some of my time today. Solution: https://gist.github.com/cdzombak/431cea0a4c0ced8042a5
public class Router : NSObject { | |
typealias VCPushBlock = (UIViewController) -> (Void) | |
init(context: NSManagedObjectContext, pushBlock: VCPushBlock) { | |
// ... | |
} | |
convenience init(context: NSManagedObjectContext, owningViewController: UIViewController) { | |
self.init(context: context, pushBlock: { | |
owningViewController.navigationController?.pushViewController($0, animated: true) | |
// compiler error on previous line: Could not find an overload for 'init' that accepts the supplied arguments | |
}) | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
This turned out to be because
Void
!=Void?
. See the solution.