You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to redefine a method and wrap its previous implementation. A macro reconstructs the signature and uses previous_def to call the original implementation. This doesn't seem to work correctly when combined with a double-splat parameter. The compiler gives an error similar to:
Error: wrong number of arguments for 'Foo#test' (given 2, expected 0..1)
Normally this doesn't happen and the normalizer acts first, however macro expansion reverses this order. Thus, the named arguments get turned into positional ones, and adding a single splat will give incorrect results:
Bug Report
I'm attempting to redefine a method and wrap its previous implementation. A macro reconstructs the signature and uses
previous_def
to call the original implementation. This doesn't seem to work correctly when combined with a double-splat parameter. The compiler gives an error similar to:Reduced code:
Crystal 1.7.3
The text was updated successfully, but these errors were encountered: