SWRoute
SWRoute copied to clipboard
Doesn't work with struct methods
So the following code generates a compiler error
Error: Partial application of struct method is not allowed
var err = SwiftRoute.replace(function: String().substringFromIndex, with: {
^^^^^^^^^^^^^^^^^^^^^^^^^^
(index : Int) -> String in
return "routed"
})
because String
is a struct, not a real class.