Debian Codegraph @

js/src/tests/test262/language/statements/with/12.10-0-12.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-12
6 description: with introduces scope - name lookup finds property
7 flags: [noStrict]
8 ---*/
9
10 function f(o) {
11
12 function innerf(o) {
13 with (o) {
14 return x;
15 }
16 }
17
18 return innerf(o);
19 }
20
21 assert.sameValue(f({x:42}), 42);
22
23 reportCompare(0, 0);