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

Rakudo fails when creating Rat from Inf.Int / 1 #1723

Closed
p6rt opened this issue Apr 24, 2010 · 6 comments
Closed

Rakudo fails when creating Rat from Inf.Int / 1 #1723

p6rt opened this issue Apr 24, 2010 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Apr 24, 2010

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

Searchable as RT74648$

@p6rt
Copy link
Author

p6rt commented Apr 24, 2010

From @bbkr

Moscow build​:

<bbkr> rakudo​: my $x = Inf; say ($x.Int / 1).WHAT; # this one looks bad,
I have Int/Int but rakudo fails with some weird message
<p6eval> rakudo 55a62a​: OUTPUT«No applicable candidates found to
dispatch to for 'infix​:<div>'. Available candidates are​:␤​:(Int $a, Int
$b)␤␤current instr.​: 'perl6;Rat;new' pc 461240 (src/gen/core.pir​:0)␤»
<jnthn> rakudo​: my $x = Inf; say $x.WHAT
<p6eval> rakudo 55a62a​: OUTPUT«Num()␤»
<bbkr> I know that Inf is kinda bugged now (Inf.Int is the max int on
machine), but I have Int/Int anyway so it should give Rat?
<jnthn> I expected so.
<jnthn> rakudo​: my $x = Inf; say $x.Int
<p6eval> rakudo 55a62a​: OUTPUT«-9223372036854775808␤»
<jnthn> rakudo​: my $x = Inf; say $x.Int.WHAT
<p6eval> rakudo 55a62a​: OUTPUT«Int()␤»
<bbkr> see :)
<jnthn> Yeah, that one looks like a bug.

@p6rt
Copy link
Author

p6rt commented May 21, 2010

From @bbkr

On ("Erlangen") build​:

perl6 -e 'my $x = Inf; say ($x.Int / 1).WHAT;'
Rat()

So it looks like fixed, still needs some testing.

@p6rt
Copy link
Author

p6rt commented May 21, 2010

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jun 23, 2010

From @bbkr

[17​:27] <pugssvn> r31416 | bbkr++ | [t/spec/S32-num/rat.t] RT #​75636
Inf.Int/1 fails to create Rat

@p6rt
Copy link
Author

p6rt commented Jun 23, 2010

@bbkr - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jun 23, 2010
@p6rt
Copy link
Author

p6rt commented Dec 30, 2017

From @zoffixznet

On Wed, 23 Jun 2010 08​:28​:18 -0700, bbkr wrote​:

[17​:27] <pugssvn> r31416 | bbkr++ | [t/spec/S32-num/rat.t] RT #​75636
Inf.Int/1 fails to create Rat

In another ticket it was rules Inf.Int is not convertable, so `Inf.Int` part
fails with `X​::Numeric​::CannotConvert`, and explodes in `/1` part.

Test unfudged and reworded to a `throws-like` test in Raku/roast@b3936232aa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant