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
error for 1/1.WHAT #4949
Comments
From @zoffixznetThe error message can probably be improved, as from user's perspective, there's no "de" parameter at hand: <Zoffix> m: say 1/1.WHAT Relevant IRC conversation: http://irclog.perlgeek.de/perl6/2015-12-28#i_11788457 |
From @zoffixznethere's related one for the numerator: <Zoffix> m: say Int/Int.WHAT |
From @cokeOn Sun Dec 27 18:27:03 2015, cpan@zoffix.com wrote:
So, the issue here is that because of the precedence, we're trying to divide by a type object (1/1.WHAT) === 1/(1.WHAT). But, nu/de are not the names of the Rat attributes. I suspect the issue might be with src/core/Rat.pm's sub DIVIDE_NUMBERS(Int:D \nu, Int:D \de, $t1, $t2) { perhaps renaming those args is the simplest fix here. -- |
1 similar comment
From @cokeOn Sun Dec 27 18:27:03 2015, cpan@zoffix.com wrote:
So, the issue here is that because of the precedence, we're trying to divide by a type object (1/1.WHAT) === 1/(1.WHAT). But, nu/de are not the names of the Rat attributes. I suspect the issue might be with src/core/Rat.pm's sub DIVIDE_NUMBERS(Int:D \nu, Int:D \de, $t1, $t2) { perhaps renaming those args is the simplest fix here. -- |
From @zoffixznet♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥ The likely fix would involve add `:D` type constraint smileys to parameters of all of these operators: https://github.com/rakudo/rakudo/blob/98fae3d84/src/core/Rat.pm#L86-L224 We don't test textual content of error messages in roast, so the tests for this ticket will likely need to go into rakudo's test suit instead: https://github.com/rakudo/rakudo/blob/nom/t/05-messages/01-errors.t |
From @zoffixznetFixed and tested in rakudo/rakudo#1359 |
@zoffixznet - Status changed from 'new' to 'resolved' |
Migrated from rt.perl.org#127051 (status was 'resolved')
Searchable as RT127051$
The text was updated successfully, but these errors were encountered: