julia> type MyType{T,N,A<:AbstractArray} <: AbstractArray{T,N}
var::A
end
julia> MyType{T,N}(var::AbstractArray{T,N}) = MyType{T,N,typeof(var)}(var)
MyType{T,N,A<:AbstractArray{T,N}}
julia> aa = MyType(zeros(2,3))
Error showing value of type MyType{Float64,2,Array{Float64,2}}:
ERROR: MethodError: `size` has no method matching size(::MyType{Float64,2,Array{Float64,2}})
Closest candidates are:
size{T,n}(::AbstractArray{T,n}, ::Any)
size(::Any, ::Integer, ::Integer, ::Integer...)
in showarray at show.jl:1231
in anonymous at replutil.jl:29
in with_output_limit at ./show.jl:1271
in writemime at replutil.jl:28
in display at REPL.jl:114
in display at REPL.jl:117
[inlined code] from multimedia.jl:151
in display at multimedia.jl:162
in print_response at REPL.jl:134
in print_response at REPL.jl:121
in anonymous at REPL.jl:624
in run_interface at ./LineEdit.jl:1610
in run_frontend at ./REPL.jl:863
in run_repl at ./REPL.jl:167
in _start at ./client.jl:420
julia>