Skip to content

Commit

Permalink
BUG: fix method ambiguity error
Browse files Browse the repository at this point in the history
  • Loading branch information
sglyon committed Apr 29, 2017
1 parent c89cfa8 commit 33326fc
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/basis_structure.jl
Original file line number Diff line number Diff line change
Expand Up @@ -286,20 +286,23 @@ end


# method to allow passing types instead of instances of ABSR
function BasisMatrix{BST<:ABSR,T2}(::Type{T2}, basis, ::Type{BST}, x, order=0)
function BasisMatrix{BST<:ABSR,T2}(::Type{T2}, basis, ::Type{BST},
x::Union{AbstractArray,TensorX}, order=0)
BasisMatrix(T2, basis, BST(), x, order)
end

function BasisMatrix{BST<:ABSR}(basis, ::Type{BST}, x, order=0)
function BasisMatrix{BST<:ABSR}(basis, ::Type{BST},
x::Union{AbstractArray,TensorX}, order=0)
BasisMatrix(basis, BST(), x, order)
end

# method without vals eltypes
function BasisMatrix{TBM<:ABSR}(basis::Basis, tbm::TBM, x, order=0)
function BasisMatrix{TBM<:ABSR}(basis::Basis, tbm::TBM,
x::Union{AbstractArray,TensorX}, order=0)
BasisMatrix(Void, basis, tbm, x, order)
end

function BasisMatrix(basis::Basis, x, order=0)
function BasisMatrix(basis::Basis, x::Union{AbstractArray,TensorX}, order=0)
BasisMatrix(Void, basis, x, order)
end

Expand Down

0 comments on commit 33326fc

Please sign in to comment.