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

Side by Side Diff: tests/language/src/Context2Test.dart

Issue 9569049: Gets rid of static analysis error in Context2Test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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
« no previous file with comments | « no previous file | 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
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 // Dart test for capturing. 4 // Dart test for capturing.
5 5
6 // Regression test for issue 5991015. 6 // Regression test for issue 5991015.
7 7
8 class V { 8 class V {
9 9
10 notCalled(Function x) { return x(); }
11
10 foofoo(x) { return x; } 12 foofoo(x) { return x; }
11 13
12 hoop(input, n) { 14 hoop(input, n) {
13 while (n-- > 0) { 15 while (n-- > 0) {
14 Expect.equals(5, input); 16 Expect.equals(5, input);
15 continue; // This continue statement must properly unchain the context. 17 continue; // This continue statement must properly unchain the context.
16 switch (input) { 18 switch (input) {
17 case 3: 19 case 3:
18 var values = foofoo; 20 var values = foofoo;
19 readPacked(() => values(input)); 21 notCalled(() => values(input));
20 } 22 }
21 } 23 }
22 } 24 }
23 } 25 }
24 26
25 main() { 27 main() {
26 new V().hoop(5, 3); 28 new V().hoop(5, 3);
27 } 29 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698