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

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

Issue 123423002: Fix checkedInstructionOrNonGenerateAtUseSite. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't try to improve var-allocator. Created 6 years, 8 months 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
OLDNEW
(Empty)
1 // Copyright (c) 2011, 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, issue 15720.
6
7 class B {}
8
9 confuse(x) {
10 if (new DateTime.now() == 42) return confuse(x);
11 return x;
12 }
13
14 main() {
15 Set<B> set = new Set<B>.from([]);
16
17 confuse(499);
18 confuse(set);
19
20 // Dart2js used to reuse a variable name, overwriting the `set` variable with
21 // one of the B's.
22 var t1 = new B();
23 var t2 = new B();
24 var t3 = new B();
25 var t4 = new B();
26
27 set.addAll([t1, t2, t3, t4]);
28 confuse(7);
29
30 set.addAll([t1, t2, t3, t4]);
31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698