Closed Bug 706719 Opened 13 years ago Closed 13 years ago

[ASC BUG] Asc misinterprets default <null> value as "null" string value [BREAKS FLASH PLAYER]

Categories

(Tamarin Graveyard :: Tools, defect, P1)

defect

Tracking

(Not tracked)

VERIFIED FIXED
Q2 12 - Cyril

People

(Reporter: virgilp, Assigned: lhansen)

References

Details

The reason Flash Player failed turns out to be ASC.

Take the following example:

===================
class MyClass {
   public function MyClass(a:String=null) 
   {
       var b:Object = a; 
       trace(b==null);
       trace(b=="null");
   }
}

var a:MyClass= new MyClass();
===================
The expected result is "true false" but it prints "false true". It's not at all obvious why because not even abcdump prints the default argument values - but the reason is in ASC putting a wrong default argument in the "MyClass" constructor.
Blocks: float/float4
Priority: -- → P1
Verified: The default argument is incorrect, it is a string (kind=1), but the value should be null (kind=12).  The bug is probably in or around checkDefaultValue in ConstantEvaluator.java, because this function performs some conversion on method default values.
Verified^2, simple fix in checkDefaultValue.
Assignee: nobody → lhansen
Target Milestone: --- → Q2 12 - Cyril
I consider this fixed, testing is ongoing though.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
changeset:   7074:9a3bea55768d
tag:         tip
user:        Brent Baker <brbaker@adobe.com>
date:        Tue Dec 13 10:16:57 2011 -0500
files:       test/acceptance/as3/asc/namespace-parameter-null-default.as test/acceptance/as3/asc/string-parameter-default-null.as
description:
Bug 706719: add test media using a String parameter with a default value as null
Bug 706402: add test media using a Namespace parameter with a default value as null
Status: RESOLVED → VERIFIED
Flags: in-testsuite+
Flags: flashplayer-triage+
Flags: flashplayer-qrb+
Flags: flashplayer-bug-
changeset: 7108:82c66e1103a5
user:      Brent Baker <brbaker@adobe.com>
summary:   Bug 706719: fix issues around quotes in the TITLE, I added this after I tested the compilation and didn't notice that the text had a double quote in it.

http://hg.mozilla.org/tamarin-redux/rev/82c66e1103a5
You need to log in before you can comment on or make changes to this bug.