2
0
Эх сурвалжийг харах

Lua: Misc tweaks and improvements to Reflect and Type.

Justin Donaldson 10 жил өмнө
parent
commit
8b60987809

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

@@ -87,7 +87,7 @@
 
 	public static function deleteField( o : Dynamic, field : String ) : Bool untyped {
 		if( !hasField(o,field) ) return false;
-		__js__("delete")(o[field]);
+		o[field] = null;
 		return true;
 	}
 

+ 1 - 2
std/lua/_std/Type.hx

@@ -131,9 +131,8 @@ enum ValueType {
 		var p = untyped c.prototype;
 		var a = [];
 		while (p != null){
-			a = a.concat(Reflect.fields(untyped c.prototype));
+			for (f in Reflect.fields(p)) a.push(f);
 			p = untyped p.prototype;
-
 		}
 		a.remove("__class__");
 		a.remove("__properties__");