This commit is contained in:
Dante
2026-05-21 23:40:20 -07:00
parent 3e2915dff7
commit 877a69d844
5737 changed files with 29796 additions and 1589684 deletions

View File

@ -559,10 +559,8 @@ class Boot {
/**
Create Haxe-compatible anonymous structure of `data` associative array
**/
static public function createAnon(data:NativeArray):Dynamic {
var o = new HxAnon();
Syntax.foreach(data, (field:String, value:Any) -> Syntax.setField(o, field, value));
return o;
static public inline function createAnon(data:NativeArray):Dynamic {
return new HxAnon(data);
}
/**
@ -948,6 +946,13 @@ private class HxDynamicStr extends HxClosure {
@:keep
@:dox(hide)
private class HxAnon extends StdClass {
public function new(fields:NativeArray = null) {
super();
if (fields != null) {
Syntax.foreach(fields, function(name, value) Syntax.setField(this, name, value));
}
}
@:phpMagic
function __get(name:String) {
return null;