Fixed #2202 AS2 detection of uninitialized class fields colliding with setters/getters

This commit is contained in:
Jindra Petřík
2024-03-23 20:02:09 +01:00
parent 25ec3e9516
commit 163a0e00d2
5 changed files with 57 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
class com.jpexs.MyClass {
class com.jpexs.MyClass {
var v;
static var sv;
var v2;
@@ -9,9 +9,12 @@ class com.jpexs.MyClass {
var c;
var d;
var _v3;
static var _sv3;
var init_v = 2;
static var sinit_v = 3;
static var sinit_v = 3;
function testVar() {
this.v = 1;
@@ -36,4 +39,25 @@ class com.jpexs.MyClass {
function deleteD() {
delete d;
}
function set v3(val) {
this._v3 = val;
}
function get v3() {
return this._v3;
}
static function set sv3(val) {
MyClass._sv3 = val;
}
static function get sv3() {
return MyClass._sv3;
}
function setV3() {
this.v = this.v3;
MyClass.sv = MyClass.sv3;
}
}