@@ -2082,7 +2082,7 @@ let generate com =
newline ctx;
end;
if has_feature ctx "use.$arrayPush" then begin
- print ctx "function $arrayPush(x) { this.push(x); }";
+ print ctx "function $arrayPush(x) { return this.push(x); }";
newline ctx
if has_feature ctx "$global.$haxeUID" then begin
@@ -0,0 +1,9 @@
+package unit.issues;
+
+class Issue10754 extends Test {
+ function test() {
+ var a = [0, 1, 2];
+ var boundPush = a.push.bind();
+ eq(boundPush(3), 4);
+ }
+}