mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-15 22:38:52 +00:00
Anonymous functions with names that are part of for example
function call.
f(5, function myName() {
});
The problem with this was introduced with adding temporary registers
for swap operation.
Fixes #2714
27 lines
453 B
ActionScript
27 lines
453 B
ActionScript
package tests
|
|
{
|
|
public class TestNamedAnonFunctions
|
|
{
|
|
public function run() : *
|
|
{
|
|
var test:* = function testFunc(param1:*, param2:int, param3:Array):Boolean
|
|
{
|
|
return (param1 as TestClass2).attrib1 == 5;
|
|
};
|
|
f(5, function g():int {
|
|
return 42;
|
|
});
|
|
}
|
|
|
|
private function f(a:int,b:Function)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
|
|
class TestClass2
|
|
{
|
|
public var attrib1:int;
|
|
}
|
|
|