blob: 882fb1350ce46c674d0a8d47d5cebcb55ef796f5 [file] [log] [blame]
fpizlo@apple.comb7613d12018-05-18 17:29:56 +00001(function() {
2 class Foo { }
3 var foo = new Foo();
4
5 class Bar { }
6 var bar = new Bar();
7
8 for (var i = 0; i < 5000000; ++i) {
9 var o;
10 if (i & 1)
11 o = foo;
12 else
13 o = bar;
14 if ((o instanceof Foo) != !!(i & 1))
15 throw "Error: bad result at i = " + i;
16 }
17})();