Skip to content
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

"does" is somehow not generating creating an updated meta-class or something #1350

Closed
p6rt opened this issue Oct 8, 2009 · 5 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Oct 8, 2009

Migrated from rt.perl.org#69654 (status was 'resolved')

Searchable as RT69654$

@p6rt
Copy link
Author

p6rt commented Oct 8, 2009

From @ilyabelikin

ihrd​: rakudo​: role R { method foo { ... } }; class C {}; (C.new does
R).^methods(​:local)>>.name>>.say;
p6eval​: rakudo 30e2cf​: ( no output )
ihrd​: why I do not got 'foo' here?
jnthn​: ihrd​: Ah, I've run into that one before.
masak​: ihrd​: I agree that you should. I don't know why you don't.
jnthn​: ihrd​: I think it's a bug.
jnthn​: ihrd​: Suspect "does" is somehow not generating creating an
updated meta-class or something.

Ilya Belikin aka Ihrd

@p6rt
Copy link
Author

p6rt commented Jul 3, 2010

From @jnthn

On Thu Oct 08 04​:52​:35 2009, ihrd wrote​:

ihrd​: rakudo​: role R { method foo { ... } }; class C {}; (C.new does
R).^methods(​:local)>>.name>>.say;
p6eval​: rakudo 30e2cf​: ( no output )
ihrd​: why I do not got 'foo' here?
jnthn​: ihrd​: Ah, I've run into that one before.
masak​: ihrd​: I agree that you should. I don't know why you don't.
jnthn​: ihrd​: I think it's a bug.
jnthn​: ihrd​: Suspect "does" is somehow not generating creating an
updated meta-class or something.

Just tried this now​:

role R { method foo { ... } }
class C {};
(C.new does R).^methods(​:local)>>.name>>.say;
foo

So, seems to work; given to moritz++ for spectests.

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented Jul 3, 2010

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jul 5, 2010

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jul 5, 2010
@p6rt
Copy link
Author

p6rt commented Jul 6, 2010

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S14-roles/mixin.t

commit 2ce38eb31607f3b0e8ca097353deb73df7597e5a
Author​: moritz <moritz@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Mon Jul 5 06​:59​:48 2010 +0000

  [t/spec] test for RT #​69654 - mixing in method with "does" should make those methods show up in introspection
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;31552 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S14-roles/mixin.t b/t/spec/S14-roles/mixin.t
index a03050e..11276dd 100644
--- a/t/spec/S14-roles/mixin.t
+++ b/t/spec/S14-roles/mixin.t
@@ -1,6 +1,6 @@
 use v6;
 use Test;
-plan 22;
+plan 23;
 
 # L<S14/Run-time Mixins/>
 
@@ -97,5 +97,12 @@ is $y.test,     42,         'method from other role was OK too';
        'can mix R4b into an Array, and access the attribute';
 }
 
+# RT #69654
+{
+    role ProvidesFoo { method foo { } }
+    class NoFoo { };
+    is (NoFoo.new does ProvidesFoo).^methods(:local)>>.name, 'foo',
+        'mixin with "does" lists method during introspection';
+}
 
 # vim: syn=perl6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant