#1641: iseq does not support the same type of operands as the math operators
-----------------------+----------------------------------------------------
 Reporter:  shockwave  |        Type:  RFC   
   Status:  new        |    Priority:  normal
Milestone:             |   Component:  imcc  
  Version:  2.3.0      |    Severity:  medium
 Keywords:             |        Lang:        
    Patch:             |    Platform:        
-----------------------+----------------------------------------------------
Description changed by bacek:

Old description:

> # 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

New description:

 # 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
 }}}

--

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1641#comment:1>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to