Browse Source

[lua] also always return the copied array in Type.allEnums (see #7209)

Dan Korostelev 7 years ago
parent
commit
fdbba9ac8f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      std/lua/_std/Type.hx

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

@@ -200,7 +200,7 @@ enum ValueType {
 	}
 
 	public static function allEnums<T>( e : Enum<T> ) : Array<T> {
-		return untyped e.__empty_constructs__;
+		return ((cast e).__empty_constructs__ : Array<T>).copy();
 	}
 
 }