Skip to content

Commit e019b2c

Browse files
anonymous function in a way that it wants to parse?
1 parent 34e01d0 commit e019b2c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/utils.jl

+3-6
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function build_function(rhss, vs, ps = (), args = (), conv = simplified_expr, ex
5252
fargs = ps == () ? :(u,$(args...)) : :(u,p,$(args...))
5353

5454
oop_ex = :(
55-
function $fname($(fargs.args...))
55+
($(fargs.args...)) -> begin
5656
X = $let_expr
5757
T = promote_type(map(typeof,X)...)
5858
convert.(T,X)
@@ -62,17 +62,14 @@ function build_function(rhss, vs, ps = (), args = (), conv = simplified_expr, ex
6262
)
6363

6464
iip_ex = :(
65-
function $fname($X,$(fargs.args...))
65+
($X,$(fargs.args...)) -> begin
6666
$ip_let_expr
6767
nothing
6868
end
6969
)
7070

7171
if expression == Val{true}
72-
return quote
73-
$oop_ex
74-
$iip_ex
75-
end
72+
return oop_ex, iip_ex
7673
else
7774
return GeneralizedGenerated.mk_function(oop_ex), GeneralizedGenerated.mk_function(iip_ex)
7875
end

0 commit comments

Comments
 (0)