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

Sometimes .does doesn't #5896

Open
p6rt opened this issue Dec 25, 2016 · 1 comment
Open

Sometimes .does doesn't #5896

p6rt opened this issue Dec 25, 2016 · 1 comment
Labels
Bug

Comments

@p6rt
Copy link

@p6rt p6rt commented Dec 25, 2016

Migrated from rt.perl.org#130405 (status was 'new')

Searchable as RT130405$

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Dec 25, 2016

From topher@topherc.net

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 {}


@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.