If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler
NEW : We have got a new blog where we post some interesting SWF internals info.

#539 for each loops does not generates "var" declaration
Author:
ether

Date created:
Type: bug
Visibility: Everybody
Assigned to:
JPEXS

Labels: AS3
State: closed 

Here is two example of faulty generated for and foreach loops.
public static function getKeys(param1:Dictionary) : Array {
var _loc2_:Array = [];
var _loc5_:* = 0;
var _loc4_:* = param1;
for (_loc3_ in param1)
{
_loc2_.push(_loc3_);
}
return _loc2_;
}
public static function getValues(param1:Dictionary) : Array {
var _loc2_:Array = [];
var _loc5_:* = 0;
var _loc4_:* = param1;
for each (_loc3_ in param1)
{
_loc2_.push(_loc3_);
}
return _loc2_;
}
Instead of _loc5_ and _loc4_, which are useless and not used, "var" should precede _loc3_
in order to get compilation right.
Instead of:
_loc16_ = 0;
_loc15_ = list;
for each (_loc6_ in list)
Should be:
for each (var _loc6_:* in list)
This should be fixed in 4.0.1
State: opened→upgraded
I close this issue due to inactivity. Please create issue if you find any problem.
State: upgraded→closed