better accessor bypass handling
This commit is contained in:
@@ -13,7 +13,6 @@ using Lambda;
|
||||
* @author Jamextreme140
|
||||
*/
|
||||
@:access(hscript.CustomClassHandler)
|
||||
@:access(hscript.Property)
|
||||
class CustomClass implements IHScriptCustomClassBehaviour {
|
||||
public var className(get, never):String;
|
||||
|
||||
@@ -174,10 +173,10 @@ class CustomClass implements IHScriptCustomClassBehaviour {
|
||||
var f = __interp.variables.get(name);
|
||||
if (f != null && allowProperty && f is Property) {
|
||||
var prop:Property = cast f;
|
||||
prop.__allowSetGet = this.__allowSetGet;
|
||||
//prop.__allowSetGet = this.__allowSetGet;
|
||||
prop.__callingProperty = true;
|
||||
var r = prop.callGetter();
|
||||
prop.__allowSetGet = true;
|
||||
var r = prop.get(!__allowSetGet);
|
||||
//prop.__allowSetGet = true;
|
||||
return r;
|
||||
}
|
||||
return f;
|
||||
@@ -187,10 +186,10 @@ class CustomClass implements IHScriptCustomClassBehaviour {
|
||||
var f = getField(name, false);
|
||||
if (f != null && f is Property) {
|
||||
var prop:Property = cast f;
|
||||
prop.__allowSetGet = this.__allowSetGet;
|
||||
//prop.__allowSetGet = this.__allowSetGet;
|
||||
prop.__callingProperty = true;
|
||||
var r = prop.callSetter(val);
|
||||
prop.__allowSetGet = true;
|
||||
var r = prop.set(val, !__allowSetGet);
|
||||
//prop.__allowSetGet = true;
|
||||
return r;
|
||||
}
|
||||
__interp.variables.set(name, val);
|
||||
|
||||
Reference in New Issue
Block a user