# New Ticket Created by  Patrick R. Michaud 
# Please include the string:  [perl #56464]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=56464 >


The islt, isle, isgt, and isge opcodes give the wrong results on
subclasses of Float.

Here's the test case:

    $ cat y.pir
    .sub 'main' :main
        $P99 = subclass 'Float', 'MyFloat'
    
        $P0 = new 'MyFloat'
        $P0 = 1.1
        $P1 = new 'MyFloat'
        $P1 = 4.5
    
        $I0 = islt $P0, $P1
        say $I0
        $I0 = isle $P0, $P1
        say $I0
        $I0 = isgt $P0, $P1
        say $I0
        $I0 = isge $P0, $P1
        say $I0
    .end
    
    $ ./parrot y.pir
    0
    0
    1
    1

Correct output should've been 1, 1, 0, 0.

Pm

Reply via email to