From 6771170865e5a6a60672930fce7f524f740b5c32 Mon Sep 17 00:00:00 2001 From: Andreas Noack Date: Thu, 15 Mar 2018 10:42:02 +0100 Subject: [PATCH 1/2] Temporarily add method to work around subtyping bug in Julia 0.6.2 --- src/IndirectArrays.jl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/IndirectArrays.jl b/src/IndirectArrays.jl index ec14cda..7961497 100644 --- a/src/IndirectArrays.jl +++ b/src/IndirectArrays.jl @@ -40,6 +40,18 @@ Base.IndexStyle(::Type{IndirectArray{T,N,A,V}}) where {T,N,A,V} = IndexStyle(A) Base.copy(A::IndirectArray) = IndirectArray(copy(A.index), copy(A.values)) +if VERSION < v"0.6.3" + # This method is only necessary because of a bug in Julia 0.6.2 and can be removed + # when we no longer support that version + @inline function Base.getindex(A::IndirectArray{<:Any,1}, i::Int) + @boundscheck checkbounds(A.index, i) + @inbounds idx = A.index[i] + @boundscheck checkbounds(A.values, idx) + @inbounds ret = A.values[idx] + ret + end +end + @inline function Base.getindex(A::IndirectArray, i::Int) @boundscheck checkbounds(A.index, i) @inbounds idx = A.index[i] From e4314157a86397bc7e75c8d0e1806faeba600ee8 Mon Sep 17 00:00:00 2001 From: Andreas Noack Date: Thu, 15 Mar 2018 10:44:38 +0100 Subject: [PATCH 2/2] Allow failures on nightly --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index bba5919..4d3e195 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,9 @@ julia: - nightly notifications: email: false +matrix: + allow_failures: + - julia: nightly # uncomment the following lines to override the default test script #script: # - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi