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

handles runs after role stub required method checking #5687

Closed
p6rt opened this issue Sep 21, 2016 · 2 comments
Closed

handles runs after role stub required method checking #5687

p6rt opened this issue Sep 21, 2016 · 2 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Sep 21, 2016

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

Searchable as RT129325$

@p6rt
Copy link
Author

p6rt commented Sep 21, 2016

From @LLFourn

role R { method f {...} };

class A { method f { } };

class B does R { has A $.a handles <f>; };

===SORRY!=== Error while compiling -e
Method 'f' must be implemented by B because it is required by a role
at -e​:5

^ it should work.
irc​: http://irclog.perlgeek.de/perl6/2016-09-21#i_13247756

@p6rt p6rt added the oo label Jan 5, 2020
@usev6
Copy link

usev6 commented Feb 19, 2023

This looks very similar to the problem reported in rakudo/rakudo#2386. There is an extra class in this issue, but it doesn't seem to be relevant for the bug.

The code works nowadays:

$ ./rakudo-m -e 'role R { method f {...} }; class A { method f { } }; class B does R { has A $.a handles <f> }; say "alive"'
alive

According to commitable it has been fixed between 2018.09 and 2018.10 -- so I'm sure it was the fix from rakudo/rakudo#2386.

21:08 < bartolin_> c: 2018.09 role R { method f {...} }; class A { method f { } }; class B does R { has A $.a handles } ## #5687
21:08 < committable6> bartolin_, ¦2018.09: «===SORRY!=== Error while compiling /tmp/r7RcbT9aiB␤Method 'f' must be implemented by B because it is required by roles: R.␤at /tmp/r7RcbT9aiB:1␤ «exit code = 1»»
21:09 < bartolin_> c: 2018.10 role R { method f {...} }; class A { method f { } }; class B does R { has A $.a handles } ## #5687
21:09 < committable6> bartolin_, ¦2018.10: «»

I'd say that the test added to roast with Raku/roast@f3dec0b3c9 covers this issue as well.
So I'll close this as "resolved". (Please reopen if you think this needs a dedicated test.)

@usev6 usev6 closed this as completed Feb 19, 2023
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

2 participants