mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-17 06:22:11 +00:00
Fixed: Script/Class initializers order of assignment
Changed: Compound script has slot/const traits inside main script initializer
This commit is contained in:
27
libsrc/ffdec_lib/testdata/compound/src/Main.as
vendored
Normal file
27
libsrc/ffdec_lib/testdata/compound/src/Main.as
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
package
|
||||
{
|
||||
import flash.display.Sprite;
|
||||
import flash.events.Event;
|
||||
|
||||
/**
|
||||
* ...
|
||||
* @author Jindra
|
||||
*/
|
||||
public class Main extends Sprite
|
||||
{
|
||||
|
||||
public function Main()
|
||||
{
|
||||
if (stage) init();
|
||||
else addEventListener(Event.ADDED_TO_STAGE, init);
|
||||
}
|
||||
|
||||
private function init(e:Event = null):void
|
||||
{
|
||||
removeEventListener(Event.ADDED_TO_STAGE, init);
|
||||
// entry point
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
4
libsrc/ffdec_lib/testdata/compound/src/Number.as
vendored
Normal file
4
libsrc/ffdec_lib/testdata/compound/src/Number.as
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
package {
|
||||
public class Number {
|
||||
}
|
||||
}
|
||||
6
libsrc/ffdec_lib/testdata/compound/src/Object.as
vendored
Normal file
6
libsrc/ffdec_lib/testdata/compound/src/Object.as
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
package
|
||||
{
|
||||
public class Object
|
||||
{
|
||||
}
|
||||
}
|
||||
9
libsrc/ffdec_lib/testdata/compound/src/Toplevel.as
vendored
Normal file
9
libsrc/ffdec_lib/testdata/compound/src/Toplevel.as
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
package {
|
||||
public namespace AS3 = "http://adobe.com/AS3/2006/builtin";
|
||||
|
||||
public const NaN: Number = 0 / 0;
|
||||
|
||||
public const Infinity: Number = 1 / 0;
|
||||
|
||||
public const undefined = void 0;
|
||||
}
|
||||
5
libsrc/ffdec_lib/testdata/compound/src/__AS3__/vec/Vector.as
vendored
Normal file
5
libsrc/ffdec_lib/testdata/compound/src/__AS3__/vec/Vector.as
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
package __AS3__.vec {
|
||||
|
||||
public class Vector {
|
||||
}
|
||||
}
|
||||
43
libsrc/ffdec_lib/testdata/compound/src/compound.as
vendored
Normal file
43
libsrc/ffdec_lib/testdata/compound/src/compound.as
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
package {
|
||||
public function trace(s:int) {
|
||||
//print something
|
||||
}
|
||||
}
|
||||
|
||||
package mypkg {
|
||||
var x:int = 7;
|
||||
var a:int = 1;
|
||||
if (x >= 5) {
|
||||
a += 100;
|
||||
} else {
|
||||
a += 200;
|
||||
}
|
||||
var b:int = a + 10;
|
||||
}
|
||||
|
||||
package mypkg2 {
|
||||
var x:int = 7;
|
||||
var a:int = 1;
|
||||
if (x >= 5) {
|
||||
a += 100;
|
||||
} else {
|
||||
a += 200;
|
||||
}
|
||||
var b:int = a + 10;
|
||||
}
|
||||
|
||||
package mypkg3 {
|
||||
trace(29);
|
||||
}
|
||||
|
||||
include "mypkg/MyClass.as"
|
||||
include "mypkg/MyClass2.as"
|
||||
|
||||
var y:int = 1;
|
||||
var c:int = 1;
|
||||
if (y >= 5) {
|
||||
c += 100;
|
||||
} else {
|
||||
c += 100;
|
||||
}
|
||||
|
||||
4
libsrc/ffdec_lib/testdata/compound/src/int.as
vendored
Normal file
4
libsrc/ffdec_lib/testdata/compound/src/int.as
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
package {
|
||||
public class int {
|
||||
}
|
||||
}
|
||||
10
libsrc/ffdec_lib/testdata/compound/src/mypkg/MyClass.as
vendored
Normal file
10
libsrc/ffdec_lib/testdata/compound/src/mypkg/MyClass.as
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
package mypkg
|
||||
{
|
||||
public class MyClass
|
||||
{
|
||||
public function test(): void
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
10
libsrc/ffdec_lib/testdata/compound/src/mypkg/MyClass2.as
vendored
Normal file
10
libsrc/ffdec_lib/testdata/compound/src/mypkg/MyClass2.as
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
package mypkg
|
||||
{
|
||||
public class MyClass2
|
||||
{
|
||||
public function test(): void
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
5
libsrc/ffdec_lib/testdata/compound/src/stubs.as
vendored
Normal file
5
libsrc/ffdec_lib/testdata/compound/src/stubs.as
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
include "Object.as"
|
||||
include "Number.as"
|
||||
include "int.as"
|
||||
include "__AS3__/vec/Vector.as"
|
||||
include "TopLevel.as"
|
||||
Reference in New Issue
Block a user