Skip to content

Commit e3b61cd

Browse files
committed
Update for TypeParameterAccessors.jl v0.4
1 parent 86d7f46 commit e3b61cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/blocksparsearrayinterface/blocksparsearrayinterface.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ end
113113
function Base.similar(interface::AbstractBlockSparseArrayInterface, T::Type, ax::Tuple)
114114
# TODO: Generalize by storing the block interface in the block sparse array interface.
115115
N = length(ax)
116-
B = similartype(blockinterface(interface), T, Tuple{blockaxistype.(ax)...})
116+
B = similartype(typeof(blockinterface(interface)), Type{T}, Tuple{blockaxistype.(ax)...})
117117
return similar(BlockSparseArray{T,N,B}, ax)
118118
end
119119

@@ -124,8 +124,8 @@ end
124124
function BlockSparseArrayInterface{N}(blockinterface::AbstractArrayInterface{N}) where {N}
125125
return BlockSparseArrayInterface{N,typeof(blockinterface)}(blockinterface)
126126
end
127-
function BlockSparseArrayInterface{M,B}(::Val{N}) where {M,B,N}
128-
return BlockSparseArrayInterface{N,B}(blockinterface(B)(Val(N)))
127+
function BlockSparseArrayInterface{M,B}(::Val{N}) where {M,B<:AbstractArrayInterface{M},N}
128+
return BlockSparseArrayInterface{N}(B(Val(N)))
129129
end
130130
function BlockSparseArrayInterface{N}() where {N}
131131
return BlockSparseArrayInterface{N}(DefaultArrayInterface{N}())

0 commit comments

Comments
 (0)