-
-
Notifications
You must be signed in to change notification settings - Fork 115
Closed
Labels
Description
The Compat.@cfunction macro (#553) seems to have an escaping or scoping bug of some kind that prevents it from being used in a function. For example:
julia> using Compat
julia> foo(x) = x+1
foo (generic function with 1 method)
julia> bar() = @cfunction(foo, Int, (Int,))
bar (generic function with 1 method)
julia> bar()
ERROR: UndefVarError: foo not defined
Stacktrace:
[1] bar() at ./REPL[3]:1
julia> baz() = cfunction(foo, Int, Tuple{Int})
baz (generic function with 1 method)
julia> baz()
Ptr{Void} @0x0000000121a79f50cc @ararslan .