blob: e557ab7a8b52461a46ab3fbe6a860438f39822b6 [file] [log] [blame]
// Iterator.prototype.next throws if applied to a non-iterator that inherits from an iterator.
load(libdir + "asserts.js");
load(libdir + "iteration.js");
var it = [1, 2][Symbol.iterator]();
var v = Object.create(it);
assertThrowsInstanceOf(function () { Iterator.prototype.next.call(v); }, TypeError);