diff --git a/base/sysimg.jl b/base/sysimg.jl index 16874fadcb50a..3bd151ca209b4 100644 --- a/base/sysimg.jl +++ b/base/sysimg.jl @@ -169,7 +169,7 @@ using .Iterators: zip, enumerate using .Iterators: Flatten, product # for generators # Definition of StridedArray -StridedReshapedArray{T,N,A<:DenseArray} = ReshapedArray{T,N,A} +StridedReshapedArray{T,N,A<:Union{DenseArray,FastContiguousSubArray}} = ReshapedArray{T,N,A} StridedArray{T,N,A<:Union{DenseArray,StridedReshapedArray}, I<:Tuple{Vararg{Union{RangeIndex, AbstractCartesianIndex}}}} = Union{DenseArray{T,N}, SubArray{T,N,A,I}, StridedReshapedArray{T,N}} diff --git a/test/arrayops.jl b/test/arrayops.jl index d4a3e1ba01735..5aa2c59c093ac 100644 --- a/test/arrayops.jl +++ b/test/arrayops.jl @@ -107,6 +107,7 @@ end @test_throws MethodError convert(Array{Int,2}, r) @test convert(Array{Int}, r) == [2,3,4] @test Base.unsafe_convert(Ptr{Int}, r) == Base.unsafe_convert(Ptr{Int}, s) + @test isa(r, StridedArray) # issue #22411 end @testset "linearslow" begin s = view(a, :, [2,3,5])