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

Fix reverse with empty StepRangeLen #30215

Merged
merged 1 commit into from
Nov 30, 2018

Conversation

blegat
Copy link
Contributor

@blegat blegat commented Nov 30, 2018

Before this PR:

julia> reverse(1.0:0.0)
ERROR: ArgumentError: StepRangeLen: offset must be in [1,0], got 0
Stacktrace:
 [1] reverse(::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}) at ./range.jl:323
 [2] top-level scope at none:0

After this PR:

julia> reverse(1.0:0.0)
1.0:-1.0:2.0

@JeffBezanson JeffBezanson added the bugfix This change fixes an existing bug label Nov 30, 2018
@timholy timholy merged commit 055da33 into JuliaLang:master Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants