@@ -292,7 +292,7 @@ extern class Syntax {
@see http://php.net/manual/en/language.oop5.cloning.php
*/
static inline function clone<T>(value:T):T {
- return Syntax.code('clone {0}', value);
+ return Syntax.code('(clone {0})', value);
}
/**
@@ -0,0 +1,12 @@
+package unit.issues;
+
+class Issue7590 extends unit.Test {
+ function test() {
+ var array = [0, 1, 2, 3, 4, 5];
+ for (k in array.copy().iterator()) {
+ array.remove(k);
+ }
+ aeq([], array);
+}