Multiple dispatch branch merged
NotFound
julian.notfound at gmail.com
Tue Oct 7 16:19:50 UTC 2008
> Looks like pow has changed though: [expr 2**3] used to return a tclint
> 8, now it returns a tclfloat 8.0; Looks like this does the same thing:
>
> .sub main :main
> $P1 = new 'Integer'
> $P1 = 2
> $P2 = new 'Integer'
> $P2 = 3
> $P3 = $P1 ** $P2
> $S0 = typeof $P3
> say $S0
> $P3 = $P1 ** 3
> $S0 = typeof $P3
> say $S0
> .end
>
> generates "Float\nInteger", I'm pretty sure that before the merge it
> would have been "Integer\nInteger".
>
> Is this desired behavior on the parrot types? If so, I can update tcl
> to override pow just like divide. (3 remaining t/cmd_expr.t test
I think this is the result of a temporary fix for other problem, when
corrected the result will be Integer, or BigInt on overflow.
--
Salu2
More information about the parrot-dev
mailing list