SWRoute icon indicating copy to clipboard operation
SWRoute copied to clipboard

Doesn't work with struct methods

Open rodionovd opened this issue 10 years ago • 0 comments

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.

rodionovd avatar Jul 01 '14 15:07 rodionovd