closes #11317
@@ -200,6 +200,6 @@ let resize a l =
set a (l - 1) vnull;
()
end else if a.alength > l then begin
- ignore(splice a l (a.alength - l) a.alength);
- ()
+ Array.fill a.avalues l (a.alength - l) vnull;
+ a.alength <- l;
end else ()
@@ -0,0 +1,10 @@
+package unit.issues;
+
+class Issue11317 extends Test {
+ function test() {
+ var array:Array<String> = ["0", "1", "2", "3", "4"];
+ array.resize(0);
+ array.resize(5);
+ utest.Assert.same([null, null, null, null, null], array);
+ }
+}