Closed
Bug 708300
Opened 13 years ago
Closed 13 years ago
[ASC BUG] ASC strict mode error comparing (float + int) > float
Categories
(Tamarin Graveyard :: Tools, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
Q2 12 - Cyril
People
(Reporter: brbaker, Unassigned)
References
Details
ASC should infer the "(v + 1)" to be a float value and therefore shouldn't have a problem with "float > float". var v:float = 0; var f:* = (v + 1) > 0; var g:* = (v + 1) > v; [Compiler] Error #1176: Comparison between a value with static type Number and a possibly unrelated type float. as3/Types/Float/test.as, Ln 12, Col 14: var g:* = (v + 1) > v; .............^
Flags: in-testsuite?
Flags: flashplayer-triage+
Flags: flashplayer-qrb+
Flags: flashplayer-bug-
Updated•13 years ago
|
Priority: -- → P2
Target Milestone: --- → Q2 12 - Cyril
Comment 1•13 years ago
|
||
Looks like evaluate(Context,BinaryExpressionNode) does not pass type information up the expression tree for non-constant expressions, and maybe not even then? Looks pretty much broken...
Comment 2•13 years ago
|
||
The type information for the constant Number node is not updated with the information that it is float, when that is discovered.
Comment 3•13 years ago
|
||
Looks straightforward to fix for binary expressions but might also be broken for unary expressions; hard to know for sure but we fixed a bug around typeof for UnaryExpression that seemed similar. (No test case was created.) We need a number of test cases here to ferret out bugs.
Comment 4•13 years ago
|
||
changeset: 82:e28357651be7 user: Lars T Hansen <lhansen@adobe.com> date: Thu Dec 08 09:41:32 2011 +0100 summary: Fix 708300 - [ASC BUG] ASC strict mode error comparing (float + int) > float
Comment 5•13 years ago
|
||
Some test cases landed with that changeset.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 6•13 years ago
|
||
testmedia: test/acceptance/as3/asc/compare-with-inference.as changeset: 7050:237162347a88 parent: 7048:2e3b3a868c0a user: Lars T Hansen <lhansen@adobe.com> date: Thu Dec 08 10:36:55 2011 +0100 summary: Fix 708300 - [ASC BUG] ASC strict mode error comparing (float + int) > float, update asc.jar to asc-float 83:b67b2caffa58
Status: RESOLVED → VERIFIED
Flags: in-testsuite? → in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•