Skip to content

Commit

Permalink
Merge pull request #56 from JuliaArrays/anj/06
Browse files Browse the repository at this point in the history
Fix some method ambiguities on 0.6
  • Loading branch information
andreasnoack authored Oct 30, 2017
2 parents 2ed35eb + af3458a commit 0797c7e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ os:
- osx
julia:
- 0.5
- 0.6
- nightly
after_success:
- julia -e 'cd(Pkg.dir("ArrayViews")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())';
Expand Down
7 changes: 4 additions & 3 deletions src/contrank.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,18 @@ restrict_crank{N}(::Type{ContRank{N}}, ::NTuple{0,Int}) = ContRank{0}
contrank() = ContRank{0}

# 1D
@compat contrank(i::Union{Colon,UnitRange}) = ContRank{1}
contrank(i::Union{Colon,UnitRange}) = ContRank{1}
contrank(i::Subs) = ContRank{0}

# 2D
@compat contrank(i1::Colon, i2::Union{Colon,UnitRange}) = ContRank{2}
contrank(i1::Colon, i2::Union{Colon,UnitRange}) = ContRank{2}
contrank(i1::Colon, i2::Subs) = ContRank{1}
contrank(i1::UnitRange, i2::Subs) = ContRank{1}
contrank(i1::Subs, i2::Subs) = ContRank{0}

# 3D
@compat contrank(i1::Colon, i2::Colon, i3::Union{Colon,UnitRange}) = ContRank{3}
contrank(i1::Colon, i2::Colon, i3::Colon) = ContRank{3}
contrank(i1::Colon, i2::Colon, i3::UnitRange) = ContRank{3}
contrank(i1::Colon, i2::Colon, i3::Subs) = ContRank{2}
contrank(i1::Colon, i2::UnitRange, i3::Subs) = ContRank{2}
contrank(i1::Colon, i2::Subs, i3::Subs) = ContRank{1}
Expand Down
1 change: 1 addition & 0 deletions src/subviews.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ end

# General

roffset(a::ContiguousArray, i1::Colon, i2::Colon, i3::Colon, i4::Colon) = 0
roffset(a::ContiguousArray, i1::Colon, i2::Colon, i3::Colon, i4::Colon, I::Colon...) = 0

function roffset(a::ContiguousArray, i1::Subs, i2::Subs, i3::Subs, i4::Subs, I::Subs...)
Expand Down

0 comments on commit 0797c7e

Please sign in to comment.