michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ michael@0: * Contributors: Igor Bukanov michael@0: */ michael@0: michael@0: function test() { michael@0: var p = Proxy.create({ enumerate: function() { return { get length() { throw 1; }}; }}); michael@0: michael@0: try { michael@0: for (i in p); michael@0: throw new Error("an exception should be thrown"); michael@0: } catch (e) { michael@0: assertEq(e, 1); michael@0: } michael@0: } michael@0: michael@0: test(); michael@0: reportCompare(0, 0, "ok");