Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for wrapping of parent's first multi-candidate #3590

Merged
merged 1 commit into from
Apr 2, 2020

Conversation

vrurg
Copy link
Member

@vrurg vrurg commented Apr 2, 2020

Resolves the problem described by @jnthn in Raku/problem-solving#170. The point of this fix is to make wrapper dispatcher transparent for the wrapped routine. Whatever combination of dispatcher/nextdispatcher the wrapped routine was invoked with – the same combination must be used when invoking the last candidate which is the actual wrapped routine code.

Temporary patch until we get the unified dispatcher, proposed in Raku/problem-solving#170.

Resolves the problem described by @jnthn in Raku/problem-solving#170.
The point of this fix is to make wrapper dispatcher transparent for the
wrapped routine. Whatever combination of dispatcher/nextdispatcher the
wrapped routine was invoked with – the same combination must be used
when invoking the last candidate which is the actual wrapped routine
code.
@vrurg vrurg self-assigned this Apr 2, 2020
@vrurg vrurg added the dispatching Routine dispatching label Apr 2, 2020
@vrurg vrurg merged commit 2cbf583 into rakudo:master Apr 2, 2020
self.new(:@candidates, :idx(1), :$next_dispatcher)
my $stashed_dispatcher := nqp::existskey($lexpad, '$*DISPATCHER')
?? nqp::atkey($lexpad, '$*DISPATCHER')
!! nqp::null();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought nqp::atkey already returns nqp::null for a non-existent key?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does for normal NQP hashes, afaik. Not for stashes, for some reason.

Altai-man added a commit that referenced this pull request May 1, 2020
This reverts commit 2cbf583, reversing
changes made to aa5154e.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dispatching Routine dispatching
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants