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

Null PMC access when two methods from different roles collide in a class composition in Rakudo #1512

Closed
p6rt opened this issue Feb 15, 2010 · 10 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Feb 15, 2010

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

Searchable as RT72856$

@p6rt
Copy link
Author

p6rt commented Feb 15, 2010

From @masak

<masak> rakudo​: role A { method x {} }; role B { method x {} }; class
C does A does B {}
<p6eval> rakudo 70667a​: OUTPUT«Null PMC access in elements() [...]
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Jun 28, 2010

From @bbkr

On Kiev build

$ perl6 -e 'role A { method x {} }; role B { method x {} }; class C does
A does B {}'
===SORRY!===
Method 'x' collides and a resolution must be provided by the class

Adding tests...

@p6rt
Copy link
Author

p6rt commented Jun 28, 2010

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

@p6rt
Copy link
Author

p6rt commented Jun 28, 2010

From @bbkr

tests added in S14-roles/composition.t

@p6rt
Copy link
Author

p6rt commented Jun 28, 2010

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

@p6rt
Copy link
Author

p6rt commented Jun 28, 2010

From @kyleha

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

commit 4ed0890c3ab73914cd23c087304be9ac37e09268
Author​: bbkr <bbkr@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Mon Jun 28 22​:33​:37 2010 +0000

  [t/spec] tests for RT #​72856 Null PMC access when two methods from different roles collide in a class composition in Rakudo
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;31492 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S14-roles/composition.t b/t/spec/S14-roles/composition.t
index ca5b4cc..73850b7 100644
--- a/t/spec/S14-roles/composition.t
+++ b/t/spec/S14-roles/composition.t
@@ -1,6 +1,6 @@
 use v6;
 use Test;
-plan 22;
+plan 23;
 
 # L<S14/Roles/"Roles may be composed into a class at compile time">
 
@@ -107,6 +107,14 @@ ok rB !~~ RT64002, 'role not matched by second role it does';
 
 }
 
+# RT #72856
+{
+    role RT72856A { method foo {} };
+    role RT72856B { method foo {} };
+    eval 'class RT72856C does RT72856A does RT72856B {}';
+    ok $! ~~ /foo .* collides/,
+        'method of the same name from two different roles collide in a class composition';
+}
 
 done_testing;
 

@p6rt
Copy link
Author

p6rt commented Oct 28, 2011

From @coke

On Mon Jun 28 15​:34​:12 2010, bbkr wrote​:

tests added in S14-roles/composition.t

Regressed in nom. Re-opening ticket.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Oct 28, 2011

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

@p6rt
Copy link
Author

p6rt commented Oct 31, 2011

From @moritz

works again, tests pass

@p6rt
Copy link
Author

p6rt commented Oct 31, 2011

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

@p6rt p6rt closed this as completed Oct 31, 2011
@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
Labels
Projects
None yet
Development

No branches or pull requests

1 participant