michael@0: // |jit-test| error: TypeError michael@0: michael@0: /* GETPROP of a known constant where the lvalue may not be an object. */ michael@0: michael@0: function foo(ox) { michael@0: var x = ox; michael@0: var n = 0; michael@0: for (var i = 0; i < 90; i++) { michael@0: n += x.f.g; michael@0: if (i >= 80) michael@0: x = undefined; michael@0: } michael@0: print(n); michael@0: } michael@0: var n = 1; michael@0: function f() {} michael@0: function g() {} michael@0: g.g = 1; michael@0: f.prototype = {f:g}; michael@0: foo(new f());