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>)' #121

Open
wuke666 opened this issue Sep 20, 2018 · 3 comments

Comments

@wuke666
Copy link

wuke666 commented Sep 20, 2018

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

let range = Range(characters.index(endIndex, offsetBy: -3) ..< endIndex) erro

@shesio
Copy link

shesio commented Sep 25, 2018

I have the same problem too ,Use this code instead can be fix
let range = startIndex ..< characters.index(startIndex, offsetBy: 1)

@wanyijun
Copy link

wanyijun commented Nov 2, 2018

楼上亲测有效 赞一个 不过报错的地方有四个 注意把offsetBy值改了就行.

@mhmdgoma
Copy link

Just remove : Range( and ending bracket )

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

4 participants