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
Rakudo should detect multi sub duplicates at compile time #1455
Comments
From @masakThis be Rakudo 8dc189. $ perl6 -e 'multi sub f($a) {}; multi sub f($a) {}; f(42)' The definition of two variants with equivalent signatures (i.e. |
From @moritzCarl MXXsak (via RT) wrote:
I've wondered about that too, and for multi methods it can make sense to Is there a way to call multiple multi subs?
agreed. Cheers, |
The RT System itself - Status changed from 'new' to 'open' |
From @bbkrDiscussion from IRC precises this ticket to be related to multi subs not [12:34] <masak> bbkr: it's probably not spec, no. but I think it's |
From @bbkr2012.10 - still NYI $ perl6 -e 'multi sub f($a) {}; multi sub f($a) {}; f(42)' in block at -e:1 |
From @smls2016.04 - still NYI. Is this feature request still deemed worthwhile? (It seems so to me, but it's one of the oldest open tickets - is there a reason it can't or shouldn't be implemented?) |
2020.05 is pretty much the same.
It's probably calling for a problem solving ticket... |
Yes, probably. To me, it falls in the same category as other "oopsie" mistakes that we could detect at compile time:
All these (and the current issue) share the following sentiment: "this would definitely fail at runtime (as soon as you hit that line), so we fail you now, at comile time, because we're nice that way and we don't want you to waste an iteration cycle that will surely fail". |
The related problem-solving ticket was closed, this is still an issue. Probably something to be solved in the RakuAST branch? |
This is the very first issue still open in the old issue tracker. Is there any attempt to solve it using RakuAST? |
Not yet, perhaps create a new issue for this and mark it with RakuAST ? |
I'm not even sure it could be solved that way... |
Pretty sure it can :-) |
Closing in favor of rakudo/rakudo#5455 |
Migrated from rt.perl.org#71536 (status was 'open')
Searchable as RT71536$
The text was updated successfully, but these errors were encountered: