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

LTA error message when adding two non-numifiable strings with infix:<+> in Rakudo #2684

Closed
p6rt opened this issue Mar 24, 2012 · 3 comments
Closed
Labels

Comments

@p6rt
Copy link

p6rt commented Mar 24, 2012

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

Searchable as RT111960$

@p6rt
Copy link
Author

p6rt commented Mar 24, 2012

From @masak

<masak> perl6​: say "5 breads" + "2 fish"
<p6eval> pugs​: OUTPUT«7␤»
<p6eval> ..niecza v15-6-gefda208​: OUTPUT«Unhandled exception​: Cannot
parse number​: 5 breads [...]
<p6eval> ..rakudo a4c78f​: OUTPUT«Cannot call 'Numeric'; none of these
signatures match​:␤​:(Mu​:U \$v, Mu %_!)␤␤ in method Numeric at
src/gen/CORE.setting​:644␤ in sub infix​:<+> at
src/gen/CORE.setting​:2284 [...]
<masak> perl6​: say "5" + "2"
<p6eval> pugs, rakudo a4c78f, niecza v15-6-gefda208​: OUTPUT«7␤»
<masak> Rakudo's error message leaves something to be desired, IMO.
<colomon> +1
* masak submits rakudobug

I'm guessing Rakudo and Niecza fail both for the same reason here​: the
strings can't be numified properly. But Rakudo's error message is not
clear that this is the cause.

@p6rt
Copy link
Author

p6rt commented Mar 25, 2012

From @moritz

Now says

./perl6 -e 'say "5 foo" + 8'
Cannot convert string to number​: trailing characters after number in '5⏏
foo' (indicated by the ⏏ symbol)
  in method Numeric at src/gen/CORE.setting​:8109
  in sub infix​:<+> at src/gen/CORE.setting​:2284
  in sub infix​:<+> at src/gen/CORE.setting​:2284
  in block <anon> at -e​:1

Tested in S32-exceptions/misc.t

@p6rt
Copy link
Author

p6rt commented Mar 25, 2012

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

@p6rt p6rt closed this as completed Mar 25, 2012
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant