From 47b5008781704d23bdc7883df9eb6b542f492c48 Mon Sep 17 00:00:00 2001 From: Jan Weidner Date: Sat, 4 Nov 2017 23:12:54 +0100 Subject: [PATCH] fix vararg calls --- src/ArgCheck.jl | 5 +++-- test/runtests.jl | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ArgCheck.jl b/src/ArgCheck.jl index daa602d..86332b5 100644 --- a/src/ArgCheck.jl +++ b/src/ArgCheck.jl @@ -35,8 +35,9 @@ end function is_simple_call(ex) isexpr(ex, :call) || return false for arg in ex.args - isexpr(arg,:parameters) && return false - isexpr(arg,:kw) && return false + isexpr(arg, :parameters) && return false + isexpr(arg, :kw) && return false + isexpr(arg, Symbol("...")) && return false end true end diff --git a/test/runtests.jl b/test/runtests.jl index 5424e47..453ad9a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -159,9 +159,11 @@ end @test !contains(err.msg, "Got") end -@testset "keyword arguments" begin +@testset "complicated calls" begin @argcheck issorted([2,1], rev=true) @argcheck issorted([2,1]; rev=true) + xs = [[1,2]] + @argcheck issorted(xs...) end @testset "deprecate" begin