OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Flags: --harmony-scoping | 5 // Flags: |
rossberg
2015/03/13 14:24:32
Remove line
Dmitry Lomov (no reviews)
2015/03/13 14:51:29
Done.
| |
6 | 6 |
7 // Test for conflicting variable bindings. | 7 // Test for conflicting variable bindings. |
8 | 8 |
9 "use strict"; | 9 "use strict"; |
10 | 10 |
11 function CheckException(e) { | 11 function CheckException(e) { |
12 var string = e.toString(); | 12 var string = e.toString(); |
13 assertTrue(string.indexOf("has already been declared") >= 0 || | 13 assertTrue(string.indexOf("has already been declared") >= 0 || |
14 string.indexOf("redeclaration") >= 0); | 14 string.indexOf("redeclaration") >= 0); |
15 return 'Conflict'; | 15 return 'Conflict'; |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
158 // Test conflicting parameter/var bindings. | 158 // Test conflicting parameter/var bindings. |
159 for (var v = 0; v < varbinds.length; ++v) { | 159 for (var v = 0; v < varbinds.length; ++v) { |
160 TestNoConflict('(function (x) {' + varbinds[v] + '})();'); | 160 TestNoConflict('(function (x) {' + varbinds[v] + '})();'); |
161 } | 161 } |
162 | 162 |
163 // Test conflicting catch/function bindings. | 163 // Test conflicting catch/function bindings. |
164 TestNoConflict('try {} catch(x) {' + funbind + '}'); | 164 TestNoConflict('try {} catch(x) {' + funbind + '}'); |
165 | 165 |
166 // Test conflicting parameter/function bindings. | 166 // Test conflicting parameter/function bindings. |
167 TestNoConflict('(function (x) {' + funbind + '})();'); | 167 TestNoConflict('(function (x) {' + funbind + '})();'); |
OLD | NEW |