fixed small oversight
This commit is contained in:
@@ -175,7 +175,7 @@ class CustomClass implements IHScriptCustomClassBehaviour {
|
||||
if (f != null && allowProperty && f is Property) {
|
||||
var prop:Property = cast f;
|
||||
prop.__allowSetGet = this.__allowSetGet;
|
||||
var r = prop.callGetter(name);
|
||||
var r = prop.callGetter();
|
||||
prop.__allowSetGet = null;
|
||||
return r;
|
||||
}
|
||||
@@ -187,7 +187,7 @@ class CustomClass implements IHScriptCustomClassBehaviour {
|
||||
if (f != null && f is Property) {
|
||||
var prop:Property = cast f;
|
||||
prop.__allowSetGet = this.__allowSetGet;
|
||||
var r = prop.callSetter(name, val);
|
||||
var r = prop.callSetter(val);
|
||||
prop.__allowSetGet = null;
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ class CustomClassHandler implements IHScriptCustomConstructor implements IHScrip
|
||||
if(f is Property && allowProperty) {
|
||||
var prop:Property = cast f;
|
||||
prop.__allowSetGet = this.__allowSetGet;
|
||||
var r = prop.callGetter(name);
|
||||
var r = prop.callGetter();
|
||||
prop.__allowSetGet = null;
|
||||
return r;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ class CustomClassHandler implements IHScriptCustomConstructor implements IHScrip
|
||||
if(f is Property) {
|
||||
var prop:Property = cast f;
|
||||
prop.__allowSetGet = this.__allowSetGet;
|
||||
var r = prop.callSetter(name, val);
|
||||
var r = prop.callSetter(val);
|
||||
prop.__allowSetGet = null;
|
||||
return r;
|
||||
}
|
||||
|
||||
+8
-2
@@ -97,8 +97,11 @@ class Property {
|
||||
} else
|
||||
interp.error(ECustom('Method $fName required by property $name is missing'));
|
||||
} else {
|
||||
if ((setter == ADefault || setter == ANull) || isVar)
|
||||
if ((setter == ADefault || setter == ANull) || isVar) {
|
||||
if(!__callingProperty)
|
||||
__allowReadAccess = false;
|
||||
return r;
|
||||
}
|
||||
else
|
||||
interp.error(ECustom('Field $name cannot be accessed because it is not a real variable${interp.isBypassAccessor ? '. Add @:isVar to enable it' : ''}'));
|
||||
}
|
||||
@@ -122,8 +125,11 @@ class Property {
|
||||
else
|
||||
interp.error(ECustom('Method $fName required by property $name is missing'));
|
||||
} else {
|
||||
if ((getter == ADefault || getter == ANull) || isVar)
|
||||
if ((getter == ADefault || getter == ANull) || isVar) {
|
||||
if(!__callingProperty)
|
||||
__allowWriteAccess = false;
|
||||
return r = val;
|
||||
}
|
||||
else
|
||||
interp.error(ECustom('Field $name cannot be accessed because it is not a real variable${interp.isBypassAccessor ? '. Add @:isVar to enable it' : ''}'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user