Skip to content

Commit 0b09cdf

Browse files
committed
Restrict AD argument checking to the dynamic modeling language.
1 parent 2a30d42 commit 0b09cdf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dsl/dsl.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,14 @@ function parse_gen_function(ast, annotations, __module__)
142142
ast = MacroTools.longdef(ast)
143143
def = MacroTools.splitdef(ast)
144144
name = def[:name]
145-
args = def[:args] .|> parse_arg .|> a -> resolve_grad_arg(a, __module__)
145+
args = map(parse_arg, def[:args])
146146
body = preprocess_body(def[:body], __module__)
147147
return_type = get(def, :rtype, :Any)
148148
static = DSL_STATIC_ANNOTATION in annotations
149149
if static
150150
make_static_gen_function(name, args, body, return_type, annotations)
151151
else
152+
args = map(a -> resolve_grad_arg(a, __module__), args)
152153
make_dynamic_gen_function(name, args, body, return_type, annotations)
153154
end
154155
end

0 commit comments

Comments
 (0)