Browse Source

[cs] fix Type.getEnumConstructs

Dan Korostelev 10 years ago
parent
commit
68e56e68a4
1 changed files with 4 additions and 2 deletions
  1. 4 2
      std/cs/_std/Type.hx

+ 4 - 2
std/cs/_std/Type.hx

@@ -263,8 +263,10 @@ using StringTools;
 	}
 
 	public static function getEnumConstructs( e : Enum<Dynamic> ) : Array<String> {
-		if (Reflect.hasField(e, "constructs"))
-			return untyped e.constructs.copy();
+		if (Reflect.hasField(e, "__hx_constructs")) {
+			var ret:Array<String> = cs.Lib.array(untyped e.__hx_constructs);
+			return ret.copy();
+		}
 		return cs.Lib.array(cs.system.Enum.GetNames(untyped e));
 	}