Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot invoke initializer for type 'Range<_>' with an argument list of type '(Range<String._CharacterView.Index>)' #74

Open
prateekpulp opened this issue Nov 29, 2018 · 1 comment

Comments

@prateekpulp
Copy link

On installing Pod this issue is coming in class AcceptSDKCardFieldsValidator.swift in this method
It is coming on Last line on return.The framework is locked so i am unable to edit the method.

subscript (r: Range) -> String {
let start = characters.index(startIndex, offsetBy: r.lowerBound)
let end = characters.index(start, offsetBy: r.upperBound - r.lowerBound)
return String(self[Range(start ..< end)])
}

@ionToderasco
Copy link

ionToderasco commented Dec 10, 2018

@prateekpulp unlock the file and use this:

    subscript (r: Range<Int>) -> String {
        let start = characters.index(startIndex, offsetBy: r.lowerBound)
        let end = characters.index(start, offsetBy: r.upperBound - r.lowerBound)
        let range = Range(uncheckedBounds: (lower: start, upper: end))
        return String(self[range])
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants