wweifu / as3-commons

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

Type Coercion failed: Array to Vector.<Op> and Array to Vector.<JumpTargetData> #134

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. calling methodBuilder.addAsmSource() with source string given in example 
tutorial :)

What is the expected output? What do you see instead?
Exception is raised.

What version of the product are you using? On what operating system?
Checked out files from svn, today. Windows 7, Flash CS6.

Please provide any additional information below.
There are simple type cast problem, in MethodBodyBuilder.addAsmSource() 
function. I've changed the following lines to fix it:

addOpcodes( result[0] );
to
addOpcodes( Vector.<Op>( result[0] ) );

and in function addBackPatches():
_backpatches = _backpatches.concat( newBackpatches );
to
_backpatches = _backpatches.concat( Vector.<JumpTargetData>(newBackpatches) );

BTW, great work, thanks!

Original issue reported on code.google.com by wojm...@gmail.com on 4 Jan 2013 at 2:16

GoogleCodeExporter commented 8 years ago
Hi there, could you please provide a patch file for the changes you're 
suggesting
Thanks for your contribution!

Original comment by rol...@stackandheap.com on 5 Jan 2013 at 3:08

GoogleCodeExporter commented 8 years ago
Hi,

Of course, here it is.. 

Original comment by wojm...@gmail.com on 5 Jan 2013 at 5:01