Closed
Bug 705830
Opened 13 years ago
Closed 13 years ago
[ASC BUG] ASC computes wrong type for typeof operator, causes errors in strict mode
Categories
(Tamarin Graveyard :: Tools, defect, P1)
Tracking
(Not tracked)
VERIFIED
FIXED
Q2 12 - Cyril
People
(Reporter: tierney, Unassigned)
References
Details
New ASC in strict mode will give errors for code like:
var foo:Array;
var x:String = typeof(foo);
produces:
[Compiler] Error #1067: Implicit coercion of a value of type Array to an unrelated type String.
test.as, Ln 2, Col 27:
var x:String = typeof(foo);
..........................^
Reporter | ||
Comment 1•13 years ago
|
||
Found this while looking at using new ASC in flex framework - if you change the type anno of 'foo' the type in the error changes as well.
Comment 2•13 years ago
|
||
Blocks initial release of float/float4 -> P1.
Comment 3•13 years ago
|
||
Clearly, evaluate(Context, UnaryExpressionNode) returns the wrong "val" for typeof.
Comment 4•13 years ago
|
||
Looks like a simple workaround here, modifying "val" to be an indeterminate string value in the case of typeof, is sufficient. Still testing.
Comment 5•13 years ago
|
||
Probable fix landed here:
changeset: 69:77aa9540127a
tag: tip
parent: 66:61574cff5b31
parent: 68:f6b50df1bcc5
user: Lars T Hansen <lhansen@adobe.com>
date: Tue Nov 29 16:04:36 2011 +0100
summary: Merge
changeset: 66:61574cff5b31
user: Lars T Hansen <lhansen@adobe.com>
date: Tue Nov 29 16:02:26 2011 +0100
summary: Fix 705830 - [ASC BUG] ASC computes wrong type for typeof operator, causes errors in strict mode
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 6•13 years ago
|
||
Testmedia added in:
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+
Flags: flashplayer-triage+
Flags: flashplayer-qrb+
Flags: flashplayer-bug-
You need to log in
before you can comment on or make changes to this bug.
Description
•