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

Infinite recursion when calling a role method from within the role block in Rakudo #3308

Closed
p6rt opened this issue Jan 4, 2014 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Jan 4, 2014

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

Searchable as RT120931$

@p6rt
Copy link
Author

p6rt commented Jan 4, 2014

From @masak

<masak> r​: role R { method foo {}; R.foo }
<camelia> rakudo-parrot e32249​: OUTPUT«(timeout)»
<camelia> ..rakudo-jvm e32249​: OUTPUT«Unhandled exception​:
java.lang.StackOverflowError [...]
* masak submits rakudobug

I would expect the above program to print nothing and exit, rather
than recurse infinitely.

@p6rt
Copy link
Author

p6rt commented Oct 17, 2014

From @usev6

This works now​:

$ perl6-m -e 'role R { method foo {}; R.foo }; say "alive"'
alive

$ perl6-p -e 'role R { method foo {}; R.foo }; say "alive"'
alive

$ perl6-j -e 'role R { method foo {}; R.foo }; say "alive"'
alive

I added a test to S14-roles/basic.t with the following commit​: Raku/roast@195e181557. I'm closing this ticket now.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Oct 17, 2014

From @usev6

This works now​:

$ perl6-m -e 'role R { method foo {}; R.foo }; say "alive"'
alive

$ perl6-p -e 'role R { method foo {}; R.foo }; say "alive"'
alive

$ perl6-j -e 'role R { method foo {}; R.foo }; say "alive"'
alive

I added a test to S14-roles/basic.t with the following commit​: Raku/roast@195e181557. I'm closing this ticket now.

@p6rt
Copy link
Author

p6rt commented Oct 17, 2014

@usev6 - Status changed from 'new' to 'resolved'

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

No branches or pull requests

1 participant