diff --git a/src/wrapper-types.jl b/src/wrapper-types.jl index 75f4e2d42..fd575b66c 100644 --- a/src/wrapper-types.jl +++ b/src/wrapper-types.jl @@ -122,10 +122,10 @@ function wrap_func_expr(mod, expr, wrap_arrays = true) (elT) -> :(AbstractArray{T} where {T <: $elT}) end if has_symwrapper(eT) - Ts = (Ts..., # _arr_type_fn(:(Symbolics.SymbolicUtils.Symbolic{<:$eT})), + Ts = (Ts..., _arr_type_fn(:(Symbolics.SymbolicUtils.Symbolic{<:$eT})), _arr_type_fn(wrapper_type(eT))) - # else - # Ts = (Ts..., _arr_type_fn(:(Symbolics.SymbolicUtils.Symbolic{<:$eT}))) + else + Ts = (Ts..., _arr_type_fn(:(Symbolics.SymbolicUtils.Symbolic{<:$eT}))) end end Ts diff --git a/test/macro.jl b/test/macro.jl index 0dd82728b..a9bc912d8 100644 --- a/test/macro.jl +++ b/test/macro.jl @@ -34,6 +34,14 @@ let @test eltype(gg) == Real @test symtype(unwrap(gg)) == SymMatrix{Real, 2} @test promote_symtype(ggg, Vector{symtype(typeof(a))}) == Any + + _a = unwrap(a) + gg = ggg([_a, 2_a]) + @test ndims(gg) == 2 + @test size(gg) == (4, 4) + @test eltype(gg) == Real + @test symtype(unwrap(gg)) == SymMatrix{Real, 2} + @test promote_symtype(ggg, Vector{symtype(typeof(a))}) == Any end let # redefine with promote_symtype