Debian Codegraph @

js/src/tests/test262/language/statements/with/12.10-0-1.js

raw
1 // Copyright (c) 2012 Ecma International. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 es5id: 12.10-0-1
6 description: >
7 with does not change declaration scope - vars in with are visible
8 outside
9 flags: [noStrict]
10 ---*/
11
12 var o = {};
13 var f = function () {
14 /* capture foo binding before executing with */
15 return foo;
16 }
17
18 with (o) {
19 var foo = "12.10-0-1";
20 }
21
22 assert.sameValue(f(), "12.10-0-1", 'f()');
23
24 reportCompare(0, 0);