// Copyright 2015 the V8 project authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.
// Previously, this caused a CHECK fail in debug mode// https://code.google.com/p/chromium/issues/detail?id=542099varfoo={};varbar=foo;for(foo.xin{a:1})functionfoo(){returnfoo;}assertEquals("object",typeofbar);assertEquals("a",bar.x);assertEquals("function",typeoffoo);assertEquals("function",typeoffoo());assertSame(foo,foo());assertEquals(undefined,foo.x);