Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix required named parameter optimization in multi dispatcher.
  • Loading branch information
jnthn committed Oct 20, 2011
1 parent cc4f39e commit 9d2f113
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/binder/multidispatch.c
Expand Up @@ -172,7 +172,8 @@ static Rakudo_md_candidate_info** sort_candidates(PARROT_INTERP, PMC *candidates
/* If it's named (and not slurpy) don't need its type info but we
* will need a bindability check during the dispatch for it. */
if (!PMC_IS_NULL(param->named_names)) {
if (!(param->flags & SIG_ELEM_IS_OPTIONAL))
if (!(param->flags & SIG_ELEM_IS_OPTIONAL) &&
VTABLE_elements(interp, param->named_names) == 1)
info->req_named = VTABLE_get_string_keyed_int(interp, param->named_names, 0);
info->bind_check = 1;
continue;
Expand Down

0 comments on commit 9d2f113

Please sign in to comment.