浏览代码

[cs] fix Type.getEnumConstructs

Dan Korostelev 10 年之前
父节点
当前提交
68e56e68a4
共有 1 个文件被更改,包括 4 次插入2 次删除
  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));
 	}