Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Side by Side Diff: tests/language/minify_closure_variable_collision_test.dart

Issue 76223002: Fix http://code.google.com/p/dart/issues/detail?id=15017. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Regression test for dart2js, that used to minify a captured
6 // variable's name to the same name as inherited Object methods.
7
8 var array = [new A()];
9
10 class A {
11 operator==(other) {
12 return true;
13 }
14 }
15
16 foo() {
17 // Use lots of variables, to maximize the chance of collisions.
18 var a = 42;
19 var b = 42;
20 var c = 42;
21 var d = 42;
22 var e = 42;
23 var f = 42;
24 var g = 42;
25 var h = 42;
26 var i = 42;
27 var j = 42;
28 var k = 42;
29 var l = 42;
30 var m = 42;
31 var n = 42;
32 array[0] = () {
33 return a + b + c + d + e + f + g + h + i + j + k + l + m + n;
34 };
35 }
36
37 main() {
38 foo();
39 if (array[0] == new A()) {
40 throw 'Test failed';
41 }
42 if (array[0]() != 42 * 14) {
43 throw 'Test failed';
44 }
45 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698