Skip to content

BoundsError in 2d comprehension #20078

Closed
Closed
@andreasnoack

Description

From MAT.jl's test suite

julia> Any[v for _ in 1:1, v in (1.0, 2.01, "string", Any["string1" "string2"])]
ERROR: BoundsError: attempt to access 1×4 Array{Any,2} at index [5]
Stacktrace:
 [1] copy!(::Array{Any,2}, ::Base.Generator{Base.Iterators.Prod2{UnitRange{Int64},Tuple{Float64,Float64,String,Array{Any,2}}},##1#2}) at ./abstractarray.jl:499
 [2] _collect(::Type{Any}, ::Base.Generator{Base.Iterators.Prod2{UnitRange{Int64},Tuple{Float64,Float64,String,Array{Any,2}}},##1#2}, ::Base.HasShape) at ./array.jl:313
 [3] collect(::Type{Any}, ::Base.Generator{Base.Iterators.Prod2{UnitRange{Int64},Tuple{Float64,Float64,String,Array{Any,2}}},##1#2}) at ./array.jl:310

Bisection blames #18457

cc: @JeffBezanson

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorregressionRegression in behavior compared to a previous version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions