mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-24 03:55:51 +00:00
Fixed #2202 AS2 return in constructor does not take a value
This commit is contained in:
@@ -208,4 +208,29 @@ public class ActionScript2ClassesTest extends ActionScript2TestBase {
|
||||
+ " com.jpexs.flash.test.testcases.TestSetterGetter.mystvar = 6;\n"
|
||||
+ " }");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testReturnInConstructor() {
|
||||
compareSrc("TestReturnInConstructor", " function TestReturnInConstructor()\n"
|
||||
+ " {\n"
|
||||
+ " var _loc1_ = 3;\n"
|
||||
+ " if(_loc1_ == 3)\n"
|
||||
+ " {\n"
|
||||
+ " trace(\"A\");\n"
|
||||
+ " return;\n"
|
||||
+ " }\n"
|
||||
+ " trace(\"B\");\n"
|
||||
+ " }\n"
|
||||
+ " function func()\n"
|
||||
+ " {\n"
|
||||
+ " var _loc1_ = 3;\n"
|
||||
+ " if(_loc1_ == 3)\n"
|
||||
+ " {\n"
|
||||
+ " trace(\"A\");\n"
|
||||
+ " return undefined;\n"
|
||||
+ " }\n"
|
||||
+ " trace(\"B\");\n"
|
||||
+ " return 5;\n"
|
||||
+ " }");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user