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 doesn't recognize when subs or methods are being redefined #226
Comments
From @masakr30166: I think it's reasonable to expect both of these to give at least a $ perl -we 'sub x {} sub x {}' |
From @masak<peters> rakudo: sub foo { }; sub foo {}; say "ok"; |
From @jnthnOn Fri Dec 12 13:54:14 2008, masak wrote:
It warns now. Can't close this ticket since we don't do anything for Jonathan |
The RT System itself - Status changed from 'new' to 'open' |
From @pmichaudOn Fri, May 08, 2009 at 04:20:28AM -0700, jnthn@jnthn.net via RT wrote:
Maybe we can split the tickets again, or we can close this ticket and Pm |
From @kylehaThe method redefinition problem (which is still open) looks the same as |
From vetinari@ankh-morp.org$ cat test.p6 |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S10-packages/basic.t commit 14bcd61d38e8e0df7bdb18a0ce9d9ed539b23837 [t/spec] Test for RT #68290 Inline Patchdiff --git a/t/spec/S10-packages/basic.t b/t/spec/S10-packages/basic.t
index 15c6d21..07eaa19 100644
--- a/t/spec/S10-packages/basic.t
+++ b/t/spec/S10-packages/basic.t
@@ -4,7 +4,7 @@ use v6;
use Test;
-plan 42;
+plan 47;
regex fairly_conclusive_platform_error {:i ^\N*<<Null?>>}
@@ -174,6 +174,21 @@ eval_lives_ok q' module MapTester { (1, 2, 3).map: { $_ } } ',
'array initialization works fine in imported subs';
}
+# RT #68290
+{
+ eval_dies_ok q[class A { sub a { say "a" }; sub a { say "a" } }],
+ 'sub redefined in class dies';
+ eval_dies_ok q[package P { sub p { say "p" }; sub p { say "p" } }],
+ 'sub redefined in package dies';
+ eval_dies_ok q[module M { sub m { say "m" }; sub m { say "m" } }],
+ 'sub redefined in module dies';
+ #?rakudo 2 skip 'RT #68290'
+ eval_dies_ok q[grammar B { token b { 'b' }; token b { 'b' } };],
+ 'token redefined in grammar dies';
+ eval_dies_ok q[class C { method c { say "c" }; method c { say "c" } }],
+ 'method redefined in class dies';
+}
+
#?rakudo todo 'RT #64688'
{
eval_lives_ok 'class RT64688_c1;use Test', 'use after class line'; |
The RT System itself - Status changed from 'new' to 'open' |
From @moritzFWIW, only the case of redefining a method in class isn't caught in |
From @jnthnOn Fri May 14 08:52:43 2010, moritz wrote:
In latest Rakudo:
Seems to cover this ticket. Tagging testneeded. /jnthn |
From @tadzikOn Wed Sep 14 13:46:03 2011, jnthn@jnthn.net wrote:
Tests available in Rakudo does not run t/spec/S12-methods/multi.t yet though, so maybe not |
@moritz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#57788 (status was 'resolved')
Searchable as RT57788$
The text was updated successfully, but these errors were encountered: