OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2012 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-scoping | |
6 'use strict'; | |
7 | |
8 let xxx = 1; | |
9 let f = undefined; | |
10 { | |
11 let inner_x = xxx; | |
12 f = function() { return inner_x; }; | |
13 } | |
14 | |
15 assertSame(1, f()); | |
16 | |
17 xxx = 42; | |
18 { | |
19 f = function() { return inner_x1; }; | |
20 let inner_x1 = xxx; | |
21 } | |
22 | |
23 assertSame(42, f()); | |
OLD | NEW |