float type information is lost after applying increment operator

VERIFIED DUPLICATE of bug 695558

Status

VERIFIED DUPLICATE of bug 695558
7 years ago
7 years ago

People

(Reporter: brbaker, Assigned: virgilp)

Tracking

unspecified
Bug Flags:
in-testsuite ?
flashplayer-qrb ?
flashplayer-bug -
flashplayer-triage +

Details

(Reporter)

Description

7 years ago
I am not sure why this is happening, but after doing an increment on the value, the type information changed to be a number. This does not seem correct from the spec since it should properly return a float from ToPrimitive and the increment should be adding 1f to the float value so it should NOT be converted into Number.

Code:

function MyObject(value)
{
    this.value = value;
    this.valueOf = function(){return this.value};
}

var flt4:float = new float(1.125f);
var o = new MyObject(flt4);

print(o.valueOf());
print(typeof o.valueOf());

o++;

print(o.valueOf());
print(typeof o.valueOf());


Output:
   1.125
   float
   2.125
   number

Expected:
   1.125
   float
   2.125
   float
Flags: in-testsuite+
Flags: flashplayer-triage+
Flags: flashplayer-qrb?
Flags: flashplayer-bug-
(Reporter)

Comment 1

7 years ago
Testmedia: /Float/flt_6_3_8-11.as
(Reporter)

Updated

7 years ago
Flags: in-testsuite+ → in-testsuite?
(Assignee)

Updated

7 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 695558
(Reporter)

Updated

7 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.