diff options
Diffstat (limited to 'js/src/jit-test/tests/arguments/defaults-call-function.js')
-rw-r--r-- | js/src/jit-test/tests/arguments/defaults-call-function.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/arguments/defaults-call-function.js b/js/src/jit-test/tests/arguments/defaults-call-function.js new file mode 100644 index 0000000000..d3dcda0865 --- /dev/null +++ b/js/src/jit-test/tests/arguments/defaults-call-function.js @@ -0,0 +1,15 @@ +load(libdir + "asserts.js"); + +function f1(a=g()) { + function g() { + } +} +assertThrowsInstanceOf(f1, ReferenceError); + +function f2(a=g()) { + function g() { + return 43; + } + assertEq(a, 42); +} +f2(42); |