Skip to content

Commit 173ac50

Browse files
committed
Make RuntimeGeneratedFunction <: Function
Seems like a good place to put it in the type hierarchy.
1 parent 1959bba commit 173ac50

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/RuntimeGeneratedFunctions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export @RuntimeGeneratedFunction
1010
1111
This type should be constructed via the macro @RuntimeGeneratedFunction.
1212
"""
13-
struct RuntimeGeneratedFunction{argnames,moduletag,id}
13+
struct RuntimeGeneratedFunction{argnames,moduletag,id} <: Function
1414
body::Expr
1515
function RuntimeGeneratedFunction(moduletag, ex)
1616
def = splitdef(ex)

test/runtests.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ f1 = @RuntimeGeneratedFunction(ex1)
3131
f2 = @RuntimeGeneratedFunction(ex2)
3232
f3 = @RuntimeGeneratedFunction(ex3)
3333

34+
@test f1 isa Function
35+
3436
du = rand(2)
3537
u = rand(2)
3638
p = nothing

0 commit comments

Comments
 (0)