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
Rakudo allows declaration of a multi and an only sub in the same scope, even in the absence of a 'proto' declaration #965
Comments
From @masak<masak> rakudo: multi sub foo(Int $n where 1) { say "OH HAI" }; sub |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S06-multi/proto.t commit 13637aaf15a83ef65dfdfc9b3e12f04ec37b2ea0 [t/spec] Test for RT #65322 Inline Patchdiff --git a/t/spec/S06-multi/proto.t b/t/spec/S06-multi/proto.t
index 6e78b4f..b1e4ecf 100644
--- a/t/spec/S06-multi/proto.t
+++ b/t/spec/S06-multi/proto.t
@@ -1,6 +1,6 @@
use v6;
use Test;
-plan 13;
+plan *;
# Test for proto definitions
class A { }
@@ -54,4 +54,16 @@ is(foo(42), 1, 'dispatch with no possible candidates fell back to proto');
eval_dies_ok 'proto rt68242($a){};proto rt68242($c,$d){};',
'attempt to define two proto subs with the same name dies';
+# RT #65322
+{
+ my $rt65322 = q[
+ multi sub rt65322( Int $n where 1 ) { 1 }
+ sub rt65322( Int $n ) { 2 }
+ ];
+ #?rakudo todo 'RT #65322'
+ eval_dies_ok $rt65322, "Can't define sub and multi sub without proto";
+}
+
+done_testing;
+
# vim: ft=perl6 |
The RT System itself - Status changed from 'new' to 'open' |
From @jnthnOn Sat Oct 10 16:50:45 2009, KyleHa wrote:
Just un-todo'd this test, since it's now passing. Resolving ticket. Thanks, Jonathan |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#65322 (status was 'resolved')
Searchable as RT65322$
The text was updated successfully, but these errors were encountered: