Debian Codegraph @

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