Skip to content

Commit cc2e4df

Browse files
committed
revert
1 parent a2b3aa4 commit cc2e4df

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/code.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ function toexpr(a::MakeArray, st)
486486
end
487487

488488
## Array
489-
@inline function _create_array(::Type{<:AbstractArray}, T, ::Val{dims}, elems...) where dims
489+
@inline function _create_array(::Type{<:Array}, T, ::Val{dims}, elems...) where dims
490490
arr = Array{T}(undef, dims)
491491
@assert prod(dims) == nfields(elems)
492492
@inbounds for i=1:prod(dims)
@@ -495,32 +495,32 @@ end
495495
arr
496496
end
497497

498-
@inline function create_array(A::Type{<:AbstractArray}, T, ::Val, d::Val, elems...)
498+
@inline function create_array(A::Type{<:Array}, T, ::Val, d::Val, elems...)
499499
_create_array(A, T, d, elems...)
500500
end
501501

502-
@inline function create_array(A::Type{<:AbstractArray}, ::Nothing, ::Val, d::Val{dims}, elems...) where dims
502+
@inline function create_array(A::Type{<:Array}, ::Nothing, ::Val, d::Val{dims}, elems...) where dims
503503
T = promote_type(map(typeof, elems)...)
504504
_create_array(A, T, d, elems...)
505505
end
506506

507507
## Vector
508508
#
509-
@inline function create_array(::Type{<:AbstractArray}, ::Nothing, ::Val{1}, ::Val{dims}, elems...) where dims
509+
@inline function create_array(::Type{<:Array}, ::Nothing, ::Val{1}, ::Val{dims}, elems...) where dims
510510
[elems...]
511511
end
512512

513-
@inline function create_array(::Type{<:AbstractArray}, T, ::Val{1}, ::Val{dims}, elems...) where dims
513+
@inline function create_array(::Type{<:Array}, T, ::Val{1}, ::Val{dims}, elems...) where dims
514514
T[elems...]
515515
end
516516

517517
## Matrix
518518

519-
@inline function create_array(::Type{<:AbstractArray}, ::Nothing, ::Val{2}, ::Val{dims}, elems...) where dims
519+
@inline function create_array(::Type{<:Array}, ::Nothing, ::Val{2}, ::Val{dims}, elems...) where dims
520520
vhcat(dims, elems...)
521521
end
522522

523-
@inline function create_array(::Type{<:AbstractArray}, T, ::Val{2}, ::Val{dims}, elems...) where dims
523+
@inline function create_array(::Type{<:Array}, T, ::Val{2}, ::Val{dims}, elems...) where dims
524524
typed_vhcat(T, dims, elems...)
525525
end
526526

0 commit comments

Comments
 (0)