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

Deprecate getindex/checkbounds methods for non Integer Real indices for Chars and Strings #12905

Merged
merged 1 commit into from
Sep 2, 2015

Conversation

ScottPJones
Copy link
Contributor

These functions depended on a version of to_index, which has been deprecated.
I tried to add tests for these methods, because they showed up as not being covered,
however I was told not to, because they give a deprecation warning.
This now gives a better error to the user, giving a work-around, and also giving the method that they called that doesn't work any longer, and eliminates the coverage holes in strings/basic.jl and char.jl

@jakebolewski jakebolewski changed the title Deprecate getindex/checkbounds methods for non Integer Real indices Deprecate getindex/checkbounds methods for non Integer Real indices for Chars and Strings Sep 1, 2015
@JeffBezanson
Copy link
Member

+1

@simonster
Copy link
Member

I may be missing something, but is there a reason these need to call depwarn explicitly instead of being defined using the @deprecate macro?

@ScottPJones
Copy link
Contributor Author

Probably not, I suppose @deprecate could be used, I was thinking about having the warning different than the default originally.

…l indices

Use deprecate macro instead of depwarn
@ScottPJones ScottPJones force-pushed the spj/deprecateindexreal branch from 67690c0 to b6ceadb Compare September 1, 2015 22:26
@ScottPJones
Copy link
Contributor Author

Bump: this now uses @deprecate instead of depwarn, passes tests, should be mergeable. Thanks!

@jakebolewski
Copy link
Member

LGTM

jakebolewski added a commit that referenced this pull request Sep 2, 2015
Deprecate getindex/checkbounds methods for non Integer Real indices for Chars and Strings
@jakebolewski jakebolewski merged commit 1e4413c into JuliaLang:master Sep 2, 2015
@ScottPJones ScottPJones deleted the spj/deprecateindexreal branch September 2, 2015 15:29
@ScottPJones
Copy link
Contributor Author

Big thanks to @jakebolewski for shepherding my coverage tests in.

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

Successfully merging this pull request may close these issues.

4 participants