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

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

Issue 10660026: Don't allow statement-nodes in expression contexts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix test for checked mode. Created 8 years, 5 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) 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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Dart2js produced a statement in an expression context for this test.
6
7 class A {
8 var foo = "foo";
9 bar(x) {
10 if (foo == 3) return;
11 var t = x;
12 if (x == 0 ) t = foo;
13 foo = t;
14 }
15 toto(x) => x;
16 titi() {
17 foo = 0;
18 for (int i = 0; i < 3; i++) bar(i);
19 }
20 }
21
22 main() => new A().titi();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698