2
0
Nicolas Cannasse 18 жил өмнө
parent
commit
bcd38e2995
1 өөрчлөгдсөн 13 нэмэгдсэн , 0 устгасан
  1. 13 0
      std/Type.hx

+ 13 - 0
std/Type.hx

@@ -509,5 +509,18 @@ class Type {
 		return true;
 	}
 
+	/**
+		Returns the constructor of an enum
+	**/
+	public static function enumConstructor( e : Dynamic ) : String {
+	#if neko
+		return new String(e.tag);
+	#else flash9
+		return e.tag;
+	#else true
+		return e[0];
+	#end
+	}
+
 }