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

runtime: bug with indexes while range in string #26542

jflenero opened this issue Jul 23, 2018 · 2 comments


None yet
3 participants
Copy link

commented Jul 23, 2018

What version of Go are you using (go version)?

go version go1.10.3 darwin/amd64

Does this issue reproduce with the latest release?


What did you do?

What did you expect to see?

We should expect a range of 37, as there are 37 characters in the string.

What did you see instead?

A range of 38, the special characters, in this case 'Ñ' make the indexes step further


This comment has been minimized.

Copy link

commented Jul 23, 2018

I think it's intended, see


This comment has been minimized.

Copy link

commented Jul 23, 2018

This is not a bug: (see the bit about range clauses, specifically for strings)

@myitcv myitcv closed this Jul 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.