better accessor bypass handling

This commit is contained in:
Jaime Humberto Macias Bustamante
2026-06-20 18:50:03 -07:00
parent 4625529be7
commit ff649efadf
3 changed files with 41 additions and 22 deletions
+6 -7
View File
@@ -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);