Skip to content

Commit

Permalink
ambiguity appears to be resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
mschauer committed Aug 22, 2017
1 parent 05fb869 commit c69a6be
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/ellipse.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import Base.getindex, Base.setindex!
const .. = Val{:...}

setindex!(A::AbstractArray{T,Ti}, x, ::Type{Val{:...}}, ::Base.Colon) where {T<:Any, Ti<:Integer} = throw( ArgumentError("cannot combine ellipse with colon this way"))
getindex(::Base.SparseArrays.SparseMatrixCSC, ::Type{Val{:...}}, ::Base.Colon) = throw( ArgumentError("cannot combine ellipse with colon this way"))

setindex!(A::AbstractArray{T,1}, x, ::Type{Val{:...}}, n) where {T} = A[n] = x
setindex!(A::AbstractArray{T,2}, x, ::Type{Val{:...}}, n) where {T} = A[ :, n] = x
setindex!(A::AbstractArray{T,3}, x, ::Type{Val{:...}}, n) where {T} = A[ :, :, n] =x
Expand Down

0 comments on commit c69a6be

Please sign in to comment.