hydra1983 / as3-commons

Automatically exported from code.google.com/p/as3-commons
0 stars 0 forks source link

Private function outside of a package reported as a SlotOrConstantTrait #50

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a SWC containing one file - a/b/var1.as - with the following content:

package a.b
{
  public var var1:int = func1();
}
function func1():int { return 1; }

2. Extract the SWF, and load as a byte array. Then use the following code to 
create an array of abcTags:
var data:ByteArray = // load the SWF into the byte array
var io:SWFFileIO = new SWFFileIO();
var swfFile:SWFFile = io.read(data);
var abcTags:Array = swfFile.getTagsByType(DoABCTag);

3. Examine the DoABCTag associated with var1.

What is the expected output? What do you see instead?
I would expect to see two traits in scriptInfo[0].traits. The first one ought 
to be a SlotOrConstantTrait containing details of var1. The second ought to be 
a MethodTrait containing details of func1.

Instead there are two SlotOrConstantTrait entries. The first is correct; the 
second contains details of func1, presented as a variable.

What version of the product are you using? On what operating system?
as3commons-bytecode-1.0-RC3.swc
as3commons-lang-0.3.2.swc
Windows 7, 64 bit. 

Please provide any additional information below.
I am testing this using an AIR application built using Flex SDK 4.5. I'm 
assuming this makes no difference to the structure of either the SWC or the way 
as3-commons behaves. Please let me know if it's worth me re-testing using 
another configuration.

Original issue reported on code.google.com by davidarnogplus@gmail.com on 6 Apr 2011 at 9:37

GoogleCodeExporter commented 9 years ago
Hi there,

thank you for reporting this! Sounds like an interesting issue, I will try to 
investigate the issue a.s.a.p., I can't say when exactly though since my daily 
job is very hectic at the moment.
Cheers,

Roland

Original comment by ihatelivelyids on 8 Apr 2011 at 11:59

GoogleCodeExporter commented 9 years ago
Hi Roland,

Please be aware that this problem isn't holding me up. The projects I have 
planned do not care about private traits. I just thought I ought to report it. 
So feel free to treat it as low priority.

Original comment by davidarnogplus@gmail.com on 9 Apr 2011 at 10:14

GoogleCodeExporter commented 9 years ago

Original comment by mastakan...@gmail.com on 11 Sep 2011 at 6:23

GoogleCodeExporter commented 9 years ago

Original comment by martin.h...@gmail.com on 12 Sep 2011 at 6:13