Skip Menu |
Report information
Id: 130405
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: topher [at] topherc.net
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [BUG] Sometimes .does doesn't
To: rakudobug [...] perl.org
Date: Sun, 25 Dec 2016 12:53:47 -0500
From: Topher Cooper <topher [...] topherc.net>
Download (untitled) / with headers
text/plain 1.5k
Couldn't find this anywhere. I know there is some modifications in this area being planned. If a class, C, in a module A "does" a role, R", in module B, and a unit elsewhere does a use of A and a use of B, then from there C.does(R) returns False. version: "This is Rakudo version 2016.11 built on MoarVM version 2016.11 implementing Perl 6.c." Occurs on both OSX (running v2016.10) and Windows. Test files: t/DoesTest1.t ----------------- # This test file fails use Test; use DoesTest2; # The following two lines and the header comment are the only differences # between DoesTest1.t and DoesTest2.t use DoesTest1; say "This version fails.\n\n"; plan 1; ok DoesTestClass.does(DoesTestRole), "This should work."; ------------------------------------------------------------- t/DoesTest2.t ----------------- # This test file succeeds use Test; use DoesTest2; # The following two lines and the header comment are the only differences # between DoesTest1.t and DoesTest2.t #use DoesTest1; say "This version succeeds.\n\n"; plan 1; ok DoesTestClass.does(DoesTestRole), "This should work."; ------------------------------------------------------------- lib/DoesTest1.pm6 ----------------- # DoesTest1.pm6 supplies a role to DoesTest2.pm6 role DoesTestRole is export {} ------------------------------------------------------------- lib/DoesTest2.pm6 ----------------- # DoesTest2.pm6 creates a class that does role supplied by DoesTest1.pm6 use DoesTest1; class DoesTestClass is export does DoesTestRole {} -------------------------------------------------------------


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org