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
In the presence of other multis with named params, Rakudo doesn't fall back to a general hash slurpy multi #1204
Comments
From @masakIt's a948cae51 o'clock, I'm sitting in a nice café with gratis $ perl6 -e 'multi foo(*%_) { say "unknown" }; foo(:key); foo(:unknown)' $ perl6 -e 'multi foo(:$key!) { say "with key" }; multi foo(*%_) { say With or with the '!' after ':$key', this problem occurs. |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S06-multi/syntax.t commit 71dc6c2454e83fb2ca5bc7c424d8284f906fcefd [t/spec] Test for RT #68234 Inline Patchdiff --git a/t/spec/S06-multi/syntax.t b/t/spec/S06-multi/syntax.t
index d0136dd..f5c2b29 100644
--- a/t/spec/S06-multi/syntax.t
+++ b/t/spec/S06-multi/syntax.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 25;
+plan 27;
# L<S06/Routine modifiers/>
# L<S06/Parameters and arguments/>
@@ -72,4 +72,13 @@ is(~&foo, 'foo', 'a multi stringifies sensibly');
is nsi_2(1, 2, 3), 'nsi 2', 'interaction between named and slurpy (4)';
}
+# RT #68234
+{
+ multi rt68234(:$key!) { 'with key' };
+ multi rt68234(*%_) { 'unknown' };
+ is rt68234(:key), 'with key', 'can find multi method with key';
+ #?rakudo skip 'RT #68234'
+ is rt68234(:unknown), 'unknown', 'can find multi method with slurpy';
+}
+
# vim: ft=perl6 |
The RT System itself - Status changed from 'new' to 'open' |
From @bbkrNOM: works correctly, checking tests... bbkr:nom bbkr$ ./perl6 -e 'multi foo(*%_) { say "unknown" }; foo(:key); |
From @bbkrMentioned tests are already unfudged and passing. |
@bbkr - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#68234 (status was 'resolved')
Searchable as RT68234$
The text was updated successfully, but these errors were encountered: