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

Error showing value of type StepRangeLen{ComplexF64, Base.TwicePrecision{ComplexF64}, Base.TwicePrecision{Float64}, Int64} #52713

Closed
olof3 opened this issue Jan 3, 2024 · 1 comment · Fixed by #53787
Labels
domain:ranges Everything AbstractRange kind:regression Regression in behavior compared to a previous version status:bisect wanted

Comments

@olof3
Copy link
Contributor

olof3 commented Jan 3, 2024

On nightly,

julia> v = 0.1*(1:5) .+ im
Error showing value of type StepRangeLen{ComplexF64, Base.TwicePrecision{ComplexF64}, Base.TwicePrecision{Float64}, Int64}:        
ERROR: MethodError: no method matching zero(::Base.TwicePrecision{Float64})

Edit: an almost identical :) StepRangeLen is mentioned here #49589 (comment), but no mention about problems with show.

@lgoettgens
Copy link
Contributor

As mentioned by @pablosanjose in #53588, this worked in 1.9.0, but fails in 1.9.1

@Seelengrab Seelengrab added the kind:regression Regression in behavior compared to a previous version label Mar 4, 2024
jishnub added a commit that referenced this issue Apr 4, 2024
Since `zero` exists for a `TwicePrecision` type, it makes sense for a
method to exist for an instance as well.
Fixes #52713, which was a regression from v1.9.1. After this, the
following may be displayed without errors:
```julia
julia> r = 1.0*(1:5) .+ im
1.0 + 1.0im:Base.TwicePrecision{Float64}(1.0, 0.0):5.0 + 1.0im
```
However, in this case, the step is a `Base.TwicePrecision`, which seems
to be an implementation detail that's leaking out, although addressing
this may be a separate PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:ranges Everything AbstractRange kind:regression Regression in behavior compared to a previous version status:bisect wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants