Ver código fonte

[cs] more unit tests fixes

Caue Waneck 12 anos atrás
pai
commit
f9072e9509
1 arquivos alterados com 6 adições e 6 exclusões
  1. 6 6
      std/cs/_std/Type.hx

+ 6 - 6
std/cs/_std/Type.hx

@@ -135,11 +135,11 @@ import cs.internal.Runtime;
 		{
 			switch(name)
 			{
-				//case #if no-root "haxe.root.Int" #else "Int" #end: return Int;
-				//case #if no-root "haxe.root.Float" #else "Float" #end: return Float;
-				//case #if no-root "haxe.root.Class" #else "Class" #end: return Class;
-				//case #if no-root "haxe.root.Dynamic" #else "Dynamic" #end: return Dynamic;
-				case #if no-root "haxe.root.String" #else "String" #end: return String;
+				case #if no-root "haxe.root.Int" #else "Int" #end: return cast Int;
+				case #if no-root "haxe.root.Float" #else "Float" #end: return cast Float;
+				case #if no-root "haxe.root.Class" #else "Class" #end: return cast Class;
+				case #if no-root "haxe.root.Dynamic" #else "Dynamic" #end: return cast Dynamic;
+				case #if no-root "haxe.root.String" #else "String" #end: return cast String;
 				default: return null;
 			}
 		} else if (t.IsInterface && cast(untyped __typeof__(IGenericObject), cs.system.Type).IsAssignableFrom(t)) {
@@ -250,7 +250,7 @@ import cs.internal.Runtime;
 
 	public static function getEnumConstructs( e : Enum<Dynamic> ) : Array<String> {
 		if (Reflect.hasField(e, "constructs"))
-			return untyped e.constructs;
+			return untyped e.constructs.copy();
 		return untyped __cs__("new Array<object>(System.Enum.GetNames(e))");
 	}