diff options
Diffstat (limited to 'js/src/tests/js1_8_5/regress/regress-620376-2.js')
-rw-r--r-- | js/src/tests/js1_8_5/regress/regress-620376-2.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/js/src/tests/js1_8_5/regress/regress-620376-2.js b/js/src/tests/js1_8_5/regress/regress-620376-2.js new file mode 100644 index 0000000..acae97e --- /dev/null +++ b/js/src/tests/js1_8_5/regress/regress-620376-2.js @@ -0,0 +1,19 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + * Contributors: Igor Bukanov + */ + +function test() { + var p = Proxy.create({ enumerate: function() { return { get length() { throw 1; }}; }}); + + try { + for (i in p); + throw new Error("an exception should be thrown"); + } catch (e) { + assertEq(e, 1); + } +} + +test(); +reportCompare(0, 0, "ok"); |