mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-07 17:35:09 +00:00
Added: AS3.1 null-conditional operator ?. (air - swf version 50)
Added: AS3.1 nullish coalescing operator `??` (air - swf version 50)
This commit is contained in:
BIN
libsrc/ffdec_lib/testdata/as3_harman/bin/harman.swf
vendored
BIN
libsrc/ffdec_lib/testdata/as3_harman/bin/harman.swf
vendored
Binary file not shown.
Binary file not shown.
@@ -4,17 +4,29 @@ package
|
||||
{
|
||||
private var a:Object = {x:1, y:2};
|
||||
private var b:String = null;
|
||||
private var c:String = null;
|
||||
|
||||
public function testNullMember() : void {
|
||||
var result:*;
|
||||
|
||||
result = a?.z;
|
||||
|
||||
result = f()?.z;
|
||||
|
||||
}
|
||||
|
||||
public function testNullCoalesce() :void {
|
||||
var result:String;
|
||||
|
||||
result = b ?? "empty";
|
||||
result = b ?? "empty";
|
||||
}
|
||||
|
||||
public function f():Object {
|
||||
return {z:5};
|
||||
}
|
||||
|
||||
public function verbatimString(): void {
|
||||
var s:String = @"ab\ncd";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user