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
Junction as default value needs to throw if it would autothread #6670
Comments
From @bbkr$ perl6 -e 'sub MAIN ( $x = 1|2 ) { }' Following oneliner will hang forever on Rakudo 2018.01. |
From @zoffixznetOn Wed, 31 Jan 2018 07:26:24 -0800, pawel.pabian@getresponse.com wrote:
We can probably improve that behaviour with an error message (it applies to any routine, not just MAIN). The problem is you're declaring an Any parameter, but your default value is a Junction, so when the default is used, it's trying to autothread the Junction and I'm guessing it keeps looping there in the guts somewhere. Looking at your use, I'm suspecting you meant to use a `where` clause instead of the default value: `perl6 -e 'sub MAIN ( $x where 1|2 ) { }' |
The RT System itself - Status changed from 'new' to 'open' |
From @zoffixznetOn Wed, 31 Jan 2018 07:56:31 -0800, cpan@zoffix.com wrote:
I started with this, but likely won't have time to finish it this week. In case someone else wants 1) jnthn++ agreed[^1] that this should throw [1] https://irclog.perlgeek.de/perl6/2018-01-31#i_15761475 |
Migrated from rt.perl.org#132794 (status was 'open')
Searchable as RT132794$
The text was updated successfully, but these errors were encountered: