diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e5a628d..3e20527 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,16 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - julia-version: ['1.5', '1.4', '1.3', '1.2', '1.1', '1.0', 'nightly'] + julia-version: + - '~1.7.0-beta4' + - '1.6' + - '1.5' + - '1.4' + - '1.3' + - '1.2' + - '1.1' + - '1.0' + - 'nightly' fail-fast: false name: Test Julia ${{ matrix.julia-version }} steps: diff --git a/src/InteractiveCodeSearch.jl b/src/InteractiveCodeSearch.jl index 8c7839d..8d23cca 100644 --- a/src/InteractiveCodeSearch.jl +++ b/src/InteractiveCodeSearch.jl @@ -74,8 +74,14 @@ maybe_identifier(s) = !startswith(string(s), "#") is_locatable(::Any) = false is_locatable(::Function) = true -is_locatable(t::Type) = !(t <: Vararg) # https://github.com/JuliaLang/julia/issues/29645 +if VERSION < v"1.7-" + is_locatable(t::Type) = !(t <: Vararg) +else + is_locatable(t::Type) = true + # t <: Vararg now throws + # https://github.com/JuliaLang/julia/issues/41446 +end is_defined_in(child, parent) = child !== parent && parentmodule(child) === parent @@ -194,7 +200,7 @@ end choose_method(methods::T) where T = _choose_method(Base.IteratorSize(T), methods) -function _choose_method(::Base.HasLength, methods) +function _choose_method(::Union{Base.HasLength,Base.HasShape}, methods) if isempty(methods) @info "No (interesting) method found" return