Repository navigation
support slurping arguments next to keyword arguments - #168
Open
singhharsh1708 wants to merge 1 commit into
Open
singhharsh1708 wants to merge 1 commit into
singhharsh1708 wants to merge 1 commit into
Conversation
singhharsh1708
force-pushed
the
varargs-with-kwargs
branch
2 times, most recently
from
September 8, 2026 21:18
7f221e3 to
95584aa
Compare
singhharsh1708
force-pushed
the
varargs-with-kwargs
branch
from
September 9, 2026 11:31
95584aa to
c6f8cf0
Compare
`get_slots` builds its inference function from the arguments and the keyword arguments concatenated into one positional list, so anything after a slurping argument left the `...` in a non-final position. Pass slurping arguments the object they collect instead of splatting them a second time, which is also what the state machine stores for them. Fixes JuliaDynamics#135
singhharsh1708
force-pushed
the
varargs-with-kwargs
branch
from
September 13, 2026 05:55
c6f8cf0 to
991406f
Compare
Benchmark Results (Julia v1)Time benchmarks
Memory benchmarks
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #135.
get_slotsconcatenates the arguments and the keyword arguments into one positional list, sof(a...; k=1)becamef(a..., k)and julia rejected the non-final.... Slurping arguments are now passed the object they collect rather than splatted a second time, there and in the wrapper that forwards to it. That object is what the state machine stores, sof(a; k...)also stops failing on aBase.PairstoTupleconversion.Tests cover
f(a...; k...),f(a; k...),f(; k...)andf(a...; k=1). Green on 1.10, 1.11 and 1.12 apart fromjet, which fails the same way on master here.Supersedes #138, which de-splatted in place and so lost the user's own
a...from the wrapper. #169 and #170 are neighbouring forms, still broken and untouched.