OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 the V8 project authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Flags: --harmony-sloppy --harmony-sloppy-function | |
6 | |
7 // Previously, this caused a CHECK fail in debug mode | |
8 // https://code.google.com/p/chromium/issues/detail?id=542099 | |
9 | |
10 var foo = {}; | |
11 var bar = foo; | |
12 for (foo.x in {a: 1}) function foo() { return foo; } | |
13 assertEquals("object", typeof bar); | |
14 assertEquals("a", bar.x); | |
15 assertEquals("function", typeof foo); | |
16 assertEquals("function", typeof foo()); | |
rossberg
2015/10/13 15:21:18
How about adding
assertSame(foo, foo());
| |
17 assertEquals(undefined, foo.x); | |
OLD | NEW |