Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
callwith/nextwith shouldn't flatten
  • Loading branch information
TimToady committed Sep 20, 2015
1 parent fd3c578 commit fec7edb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/control.pm
Expand Up @@ -104,17 +104,17 @@ multi sub succeed(|) {

sub proceed() { THROW-NIL(nqp::const::CONTROL_PROCEED) }

my &callwith := -> *@pos, *%named {
my &callwith := -> |c {
my Mu $dispatcher := nqp::p6finddispatcher('callwith');
$dispatcher.exhausted ?? Nil !!
$dispatcher.call_with_args(|@pos, |%named)
$dispatcher.call_with_args(|c)
};

my &nextwith := -> *@pos, *%named {
my &nextwith := -> |c {
my Mu $dispatcher := nqp::p6finddispatcher('nextwith');
unless $dispatcher.exhausted {
nqp::p6routinereturn(nqp::p6recont_ro(
$dispatcher.call_with_args(|@pos, |%named)))
$dispatcher.call_with_args(|c)))
}
Nil
};
Expand Down

0 comments on commit fec7edb

Please sign in to comment.