Skip to content

Commit 7d9d23a

Browse files
authored
Merge pull request #96 from cstjean/forward-kwargs
Have @forward handle kwargs
2 parents 7274dff + 9ec7899 commit 7d9d23a

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)