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
monkey-typed method new is not called #1931
Comments
From @moritz19:13 <@jnthn> rakudo: use MONKEY_TYPING; class Foo { }; augment class |
From @kylehaThis is an automatically generated mail to inform you that tests are now available in t/spec/S12-construction/construction.t commit f2824799ff1c44418b7348893d9d6353b96d4771 [t/spec] test for RT #76476, monkey-typed method new is not called Inline Patchdiff --git a/t/spec/S12-construction/construction.t b/t/spec/S12-construction/construction.t
index 16b1573..dd91430 100644
--- a/t/spec/S12-construction/construction.t
+++ b/t/spec/S12-construction/construction.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 14;
+plan 15;
# L<S12/"Construction and Initialization">
@@ -76,4 +76,17 @@ is Foo.new("a string").a, 'a string', "our own 'new' was called";
is $a.env<foo>, 'bar', 'assignment works';
}
+# RT #76476
+{
+ use MONKEY_TYPING;
+ class MonkeyNew { has $.x is rw };
+ augment class MonkeyNew {
+ method new() {
+ self.bless(*, :x('called'));
+ }
+ };
+ #?rakudo todo 'RT 76476'
+ is MonkeyNew.new().x, 'called', 'monkey-typed .new() method is called';
+}
+
# vim: ft=perl6 |
The RT System itself - Status changed from 'new' to 'open' |
From @cokeOn Mon Jul 12 10:15:55 2010, moritz wrote:
This now prints: called And, bonus, we have an auto-generated test message, closing ticket. -- |
@coke - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#76476 (status was 'resolved')
Searchable as RT76476$
The text was updated successfully, but these errors were encountered: