diff options
Diffstat (limited to 'js/src/jit-test/tests/jaeger/inline/undefinedLocal.js')
-rw-r--r-- | js/src/jit-test/tests/jaeger/inline/undefinedLocal.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/jaeger/inline/undefinedLocal.js b/js/src/jit-test/tests/jaeger/inline/undefinedLocal.js new file mode 100644 index 000000000..f6fb12996 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/inline/undefinedLocal.js @@ -0,0 +1,19 @@ + +function bar(n) { + var a; + if (n < 50) + a = n; + return a; +} + +function foo() { + for (var i = 0; i < 100; i++) { + var q = bar(i); + if (i < 50) + assertEq(q, i); + else + assertEq(q, undefined); + } +} + +foo(); |