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

Error: .polymod on Int with non-Int divisors #5324

Open
p6rt opened this issue May 18, 2016 · 2 comments
Open

Error: .polymod on Int with non-Int divisors #5324

p6rt opened this issue May 18, 2016 · 2 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented May 18, 2016

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

Searchable as RT128173$

@p6rt
Copy link
Author

p6rt commented May 18, 2016

From @zoffixznet

When .polymod on an Int invocan is called with a non-Int divisor, the error message is very confusing, since there's no `div` in user's code​:

$ perl6 -e 'say 42.polymod​: 1.5'
Cannot call infix​:<div>(Int, Rat); none of these signatures match​:
  (Int​:D \a, Int​:D \b)
  (int $a, int $b --> int)
  in block <unit> at -e line 1

It should instead point out that the user needs to coerce the invocant to Num or Rat for the non-Int divisors to work.

@p6rt
Copy link
Author

p6rt commented Jul 9, 2016

From @zoffixznet

The fix for this kinda depends on how https://rt-archive.perl.org/perl6/Ticket/Display.html?id=128428#ticket-history will get resolved.

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant