From 0ef043c80d6d8e4bfc648d610f6f76da3750b7bb Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Tue, 17 Apr 2018 16:00:05 -0400 Subject: [PATCH] add test case from issue #26607, cfunction with no args --- test/ccall.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/ccall.jl b/test/ccall.jl index 10cabf4580be6..9b1464e061004 100644 --- a/test/ccall.jl +++ b/test/ccall.jl @@ -1424,3 +1424,12 @@ macro cglobal26297(sym) end cglobal26297() = @cglobal26297(:global_var) @test cglobal26297() != C_NULL + +# issue #26607 +noop_func_26607 = () -> nothing +function callthis_26607(args) + @cfunction(noop_func_26607, Cvoid, ()) + return nothing +end +@test callthis_26607(Int64(0)) === nothing +@test callthis_26607(Int32(0)) === nothing