diff --git a/tests/ecmascript/test-bug-array-fastpath-push-retval.js b/tests/ecmascript/test-bug-array-fastpath-push-retval.js new file mode 100644 index 00000000..a83a16b2 --- /dev/null +++ b/tests/ecmascript/test-bug-array-fastpath-push-retval.js @@ -0,0 +1,19 @@ +/* + * https://github.com/svaarala/duktape/pull/1154 + */ + +/*=== +number 5 +===*/ + +function test() { + var arr = [ 1, 2, 3 ]; + var ret = arr.push('foo', 'bar'); + print(typeof ret, ret); +} + +try { + test(); +} catch (e) { + print(e.stack || e); +}