Fixed #2231 AS3 coercion to String as convert

This commit is contained in:
Jindra Petřík
2024-07-13 19:55:09 +02:00
parent e1cbba7146
commit 502d44b06d
8 changed files with 34 additions and 2 deletions

View File

@@ -1770,6 +1770,13 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
false);
}
@Test
public void testStringCoerce() {
decompileMethod("classic_air", "testStringCoerce", "var text1:String = this.a[\"test\"];\r\n"
+ "var text2:String = String(this.a[\"test\"]);\r\n",
false);
}
@Test
public void testStringConcat() {
decompileMethod("classic_air", "testStringConcat", "var k:int = 8;\r\n"

View File

@@ -1757,6 +1757,13 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes
false);
}
@Test
public void testStringCoerce() {
decompileMethod("classic", "testStringCoerce", "var text1:String = this.a[\"test\"];\r\n"
+ "var text2:String = String(this.a[\"test\"]);\r\n",
false);
}
@Test
public void testStringConcat() {
decompileMethod("classic", "testStringConcat", "var k:int = 8;\r\n"