@@ -9,7 +9,7 @@ function _append_fields!(t::Expr, body::Expr, sym::Symbol, ::Type{T}) where {T}
99 TF = fieldtype (T, f)
1010 Base. issingletontype (TF) && continue
1111 gfcall = Expr (:call , getfield, sym, f)
12- if fieldcount (TF) ≡ 0
12+ if fieldcount (TF) ≡ 0 || TF <: Array
1313 push! (t. args, gfcall)
1414 elseif TF <: DataType
1515 push! (t. args, Expr (:call , Expr (:curly , lv (:StaticType ), gfcall)))
2626 t = Expr (:tuple )
2727 if Base. issingletontype (T)
2828 nothing
29- elseif fieldcount (T) ≡ 0
29+ elseif fieldcount (T) ≡ 0 || T <: Array
3030 push! (t. args, :r )
3131 elseif T <: DataType
3232 push! (t. args, Expr (:call , Expr (:curly , lv (:StaticType ), :r )))
@@ -42,7 +42,7 @@ function rebuild_fields(offset::Int, ::Type{T}) where {T}
4242 TF = fieldtype (T, f)
4343 if Base. issingletontype (TF)
4444 push! (call. args, TF. instance)
45- elseif fieldcount (TF) ≡ 0
45+ elseif fieldcount (TF) ≡ 0 || TF <: Array
4646 push! (call. args, Expr (:call , getfield, :t , (offset += 1 )))
4747 elseif TF <: DataType
4848 push! (
5959@generated function reassemble_tuple (:: Type{T} , t:: Tuple ) where {T}
6060 if Base. issingletontype (T)
6161 return T. instance
62- elseif fieldcount (T) ≡ 0
62+ elseif fieldcount (T) ≡ 0 || T <: Array
6363 call = Expr (:call , getfield, :t , 1 )
6464 elseif T <: DataType
6565 call = Expr (:call , lv (:gettype ), Expr (:call , getfield, :t , 1 ))
0 commit comments