Skip to content

Commit 9ec7899

Browse files
committed
Have @forward handle kwargs
1 parent 7274dff commit 9ec7899

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/examples/forward.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ macro forward(ex, fs)
1414
@capture(ex, T_.field_) || error("Syntax: @forward T.x f, g, h")
1515
T = esc(T)
1616
fs = isexpr(fs, :tuple) ? map(esc, fs.args) : [esc(fs)]
17-
:($([:($f(x::$T, args...) = (Base.@_inline_meta; $f(x.$field, args...)))
17+
:($([:($f(x::$T, args...; kwargs...) =
18+
(Base.@_inline_meta; $f(x.$field, args...; kwargs...)))
1819
for f in fs]...);
1920
nothing)
2021
end

0 commit comments

Comments
 (0)