diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/testMethodSet.js')
-rw-r--r-- | js/src/jit-test/tests/basic/testMethodSet.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testMethodSet.js b/js/src/jit-test/tests/basic/testMethodSet.js new file mode 100644 index 0000000000..d7fcd7fc08 --- /dev/null +++ b/js/src/jit-test/tests/basic/testMethodSet.js @@ -0,0 +1,13 @@ +function testMethodSet() { // bug 503198 + function o() { return 'o'; } + function k() { return 'k'; } + + var x; + for (var i = 0; i < 10; i++) { + x = {}; + x.o = o; + x.k = k; + } + return x.o() + x.k(); +} +assertEq(testMethodSet(), "ok"); |