Просмотр исходного кода

Lua: Fix Reflect for properties

Justin Donaldson 9 лет назад
Родитель
Сommit
a84291a9fa
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      std/lua/_std/Reflect.hx

+ 1 - 1
std/lua/_std/Reflect.hx

@@ -44,7 +44,7 @@ import lua.Boot;
 
 	public static inline function setProperty( o : Dynamic, field : String, value : Dynamic ) : Void untyped {
 		var tmp : String;
-		if( o.__properties__ && (tmp=o.__properties__["set_"+field]) ) callMethod(o,untyped tmp, [value]) else o[field] = __define_feature__("Reflect.setProperty",value);
+		if( o.__properties__ && (tmp=o.__properties__["set_"+field]) ) callMethod(o,Reflect.field(o, tmp), [value]) else o[field] = __define_feature__("Reflect.setProperty",value);
 	}
 
 	public inline static function callMethod( o : Dynamic, func : haxe.Constraints.Function, args : Array<Dynamic> ) : Dynamic  {