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

SI-9936 SeqLike.indexWhere starts at zero #5421

Merged
merged 1 commit into from Sep 30, 2016
Merged

Conversation

som-snytt
Copy link
Contributor

This follows the Scaladoc, and makes

"abcdef".indexOf('c', -1)

work like

"abcdef".toVector.indexOf('c', -1)

This follows the Scaladoc, and makes
```
"abcdef".indexOf('c', -1)
```
work like
```
"abcdef".toVector.indexOf('c', -1)
```
@scala-jenkins scala-jenkins added this to the 2.12.1 milestone Sep 26, 2016
@lrytz
Copy link
Member

lrytz commented Sep 30, 2016

LGTM, thanks!

@lrytz lrytz merged commit e1e895c into scala:2.12.x Sep 30, 2016
@som-snytt som-snytt deleted the issue/9936 branch October 7, 2016 06:17
@tzachz
Copy link

tzachz commented Dec 30, 2016

Should there be a similar fix for what seems to be the same issue in LineraSeqOptimized? See here.

scala> "abcde".indexOf('c', -1)
res3: Int = 2

scala> "abcde".toVector.indexOf('c', -1)
res4: Int = 2

scala> "abcde".toList.indexOf('c', -1)
res5: Int = 1

@som-snytt
Copy link
Contributor Author

@tzachz Thanks!

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