Debian Codegraph @

js/src/tests/test262/language/statements/with/12.10-0-3.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-3
6 description: with introduces scope - that is captured by function expression
7 flags: [noStrict]
8 ---*/
9
10 var o = {prop: "12.10-0-3 before"};
11 var f;
12
13 with (o) {
14 f = function () { return prop; }
15 }
16 o.prop = "12.10-0-3 after";
17
18 assert.sameValue(f(), "12.10-0-3 after", 'f()');
19
20 reportCompare(0, 0);