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
a memory error occurs when the a method overridden in an 'is also' class declaration is called in Rakudo #1073
Comments
From @masak<masak> rakudo: class Failure is also { method foo {say "OH HAI"} }; .foo |
From @cokeOn Thu Jun 18 04:24:13 2009, masak wrote:
< [Coke]> rakudo: use MONKEY_TYPING; augment class Failure { method < [Coke]> rakudo: use MONKEY_TYPING; class A { method foo { 1 } }; This looks much saner. Assigning to moritz++ for testing. -- |
The RT System itself - Status changed from 'new' to 'open' |
@moritz - Status changed from 'open' to 'resolved' |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S12-class/augment-supersede.t commit 832c1a0d999adb004e37f460c44b8b357fc61b09 [t/spec] test for RT #66694, redefining methods by augmenting stuff Inline Patchdiff --git a/t/spec/S12-class/augment-supersede.t b/t/spec/S12-class/augment-supersede.t
index 1230032..b4e07f2 100644
--- a/t/spec/S12-class/augment-supersede.t
+++ b/t/spec/S12-class/augment-supersede.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 5;
+plan 6;
# L<S12/"Open vs Closed Classes"/"Otherwise you'll get a class redefinition error.">
@@ -23,6 +23,12 @@ use MONKEY_TYPING;
ok(!eval('augment class NonExistent { }'), 'augment on non-existent class dies');
}
+# RT #66694
+eval_dies_ok q[
+ class MethodClash { method foo() { 3 } };
+ augment class MethodClash { method foo() { 3 } };
+], 'cannot override a method by monkey-typing';
+
#?rakudo skip 'supersede'
{
class Bar { |
Migrated from rt.perl.org#66694 (status was 'resolved')
Searchable as RT66694$
The text was updated successfully, but these errors were encountered: