| Index: test/mjsunit/harmony/block-scoping-top-level.js
|
| diff --git a/test/mjsunit/harmony/block-scoping-top-level.js b/test/mjsunit/harmony/block-scoping-top-level.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9e45b091575d19270d35ebd72bac570f8588611e
|
| --- /dev/null
|
| +++ b/test/mjsunit/harmony/block-scoping-top-level.js
|
| @@ -0,0 +1,23 @@
|
| +// Copyright 2012 the V8 project authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// Flags: --harmony-scoping
|
| +'use strict';
|
| +
|
| +let xxx = 1;
|
| +let f = undefined;
|
| +{
|
| + let inner_x = xxx;
|
| + f = function() { return inner_x; };
|
| +}
|
| +
|
| +assertSame(1, f());
|
| +
|
| +xxx = 42;
|
| +{
|
| + f = function() { return inner_x1; };
|
| + let inner_x1 = xxx;
|
| +}
|
| +
|
| +assertSame(42, f());
|
|
|