petdance/scratch — Issue #295: iseq does not support the same type of operands as the math operators
Author: petdance
Created: 2011-11-14 05:55:33+00:00
State: open
Labels: imcc, Pri-normal, rfc, Sev-medium

# Within a method ... This doesn't work.
{{{
$I0 = 1
$P0 = getattribute self, 'someIntField'
$I1 = iseq $I0, $P0
}}}

# Error message:
# error:imcc:The opcode 'iseq_i_i_p' (iseq<3>) was not found. Check the type and number of the arguments

There is already support for math operands with mixed types, so allowing iseq to have the same behavior is good for consistency:

{{{
# Test by bacek
~/src/parrot (ops_pct_local)$ cat t.pir
.sub "main"
$N0 = 40.0
$I0 = 2
$N1 = $N0 + $I0
say $N1
.end
~/src/parrot (ops_pct_local)$ ./parrot t.pir
42
}}}

Originally http://trac.parrot.org/parrot/ticket/1641