File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -872,7 +872,7 @@ class Polymod
872872 public static function blacklistInstanceFields (parentClass : Class <Dynamic >, fields : Array <String >): Void
873873 {
874874 #if hscript
875- PolymodScriptClass .blacklistedInstanceFields .set (parentClass , fields );
875+ PolymodScriptClass .blacklistedInstanceFields .set (Type . getClassName ( parentClass ) , fields );
876876 #else
877877 Polymod .warning (PolymodErrorCode .SCRIPT_HSCRIPT_NOT_INSTALLED , ' Scripted classes imports were requested, but hscript is not installed.' );
878878 #end
Original file line number Diff line number Diff line change @@ -1127,10 +1127,11 @@ class PolymodInterpEx extends Interp
11271127 case TEnum (enm ):
11281128 Std .string (enm );
11291129 case TObject :
1130- o ;
1130+ #if hl Std . string ( o ); #else o ; #end
11311131 default :
11321132 Std .string (Type .typeof (o ));
11331133 }
1134+ #if hl oCls = oCls .replace (' $' , ' ' ); #end
11341135
11351136 // Check if the field is a blacklisted static field.
11361137 if (PolymodScriptClass .blacklistedStaticFields .exists (o ) && PolymodScriptClass .blacklistedStaticFields .get (o ).contains (f ))
@@ -1252,10 +1253,11 @@ class PolymodInterpEx extends Interp
12521253 case TEnum (enm ):
12531254 Std .string (enm );
12541255 case TObject :
1255- o ;
1256+ #if hl Std . string ( o ); #else o ; #end
12561257 default :
12571258 Std .string (Type .typeof (o ));
12581259 }
1260+ #if hl oCls = oCls .replace (' $' , ' ' ); #end
12591261
12601262 // Check if the field is a blacklisted static field.
12611263 if (PolymodScriptClass .blacklistedStaticFields .exists (o ) && PolymodScriptClass .blacklistedStaticFields .get (o ).contains (f ))
Original file line number Diff line number Diff line change 11package polymod .hscript ._internal ;
22
33#if hscript
4+ import haxe .ds .ObjectMap ;
45import hscript .Expr .FieldDecl ;
56import hscript .Expr .FunctionDecl ;
67import hscript .Expr .VarDecl ;
@@ -40,16 +41,16 @@ class PolymodScriptClass
4041 public static final defaultImports : Map <String , Class <Dynamic >> = new Map <String , Class <Dynamic >>();
4142
4243 /**
43- * Provide a class name with an array of its static fields to blacklist them.
44+ * Provide a class with an array of its static fields to blacklist them.
4445 * Blacklisted fields cannot be gotten or set.
4546 */
46- public static final blacklistedStaticFields : Map <Dynamic , Array <String >> = new Map <Dynamic , Array <String >>();
47+ public static final blacklistedStaticFields : ObjectMap <Dynamic , Array <String >> = new ObjectMap <Dynamic , Array <String >>();
4748
4849 /**
49- * Provide a class name with an array of its instance fields to blacklist them.
50+ * Provide a class with an array of its instance fields to blacklist them.
5051 * Blacklisted fields cannot be gotten or set.
5152 */
52- public static final blacklistedInstanceFields : Map <Dynamic , Array <String >> = new Map <Dynamic , Array <String >>();
53+ public static final blacklistedInstanceFields : Map <String , Array <String >> = new Map <String , Array <String >>();
5354
5455 /*
5556 * STATIC METHODS
You can’t perform that action at this time.
0 commit comments