blob: 3b54b17da0bdf26719d490b711ce4a08da202454 [file] [log] [blame]
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001// Copyright 2014 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"use strict";
5
6function f() {
7 var y = 1;
8 var q1;
9 var q;
10 var z = new Error();
11 try {
12 throw z;
13 } catch (y) {
14 assertTrue(z === y);
15 q1 = function() { return y; }
16 var y = 15;
17 q = function() { return y; }
18 assertSame(15, y);
19 }
20 assertSame(1, y);
21 assertSame(15, q1());
22 assertSame(15, q());
23}
24
25f();