Skip to content

Commit

Permalink
fix vararg calls
Browse files Browse the repository at this point in the history
  • Loading branch information
jw3126 committed Nov 13, 2017
1 parent d031df2 commit 47b5008
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/ArgCheck.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 47b5008

Please sign in to comment.