Merge pull request #469 from invenia/ed/hang-draw-and-quarter

Stop type treason with show of the TrackedArray type
This commit is contained in:
Mike J Innes 2018-11-06 11:54:07 +00:00
parent c3ca56f3ce
commit 9d563820f8
1 changed files with 4 additions and 2 deletions

View File

@ -33,8 +33,10 @@ TrackedArray(x::AbstractArray) = TrackedArray(Call(), x, zero(x))
Base.eltype(x::Type{<:TrackedArray{T}}) where T <: Real = TrackedReal{T}
Base.show(io::IO, ::Type{TrackedArray{T,N,A}}) where {T,N,A<:AbstractArray{T,N}} =
print(io, "TrackedArray{…,$A}")
Base.show(io::IO, t::Type{TrackedArray{T,N,A}}) where {T,N,A<:AbstractArray{T,N}} =
@isdefined(A) ?
print(io, "TrackedArray{…,$A}") :
invoke(show, Tuple{IO,DataType}, io, t)
function Base.summary(io::IO, x::TrackedArray)
print(io, "Tracked ")