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

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

Issue 25630002: Fix issue 13474. Simplify graph builder for Boolean operators AND, OR: do not optimize code when th… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | « runtime/vm/flow_graph_builder.cc ('k') | tests/language/language_dart2js.status » ('j') | 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 // VMOptions=--enable_type_checks
5
6 import "package:expect/expect.dart";
7
8 main() {
9 var a;
10 Expect.throws(() { true && (a = 5); }, (error) => error is TypeError);
11 Expect.throws(() { (a = 5) && true; }, (error) => error is TypeError);
12 Expect.throws(() { false || (a = 5); }, (error) => error is TypeError);
13 Expect.throws(() { (a = 5) || false; }, (error) => error is TypeError);
14 Expect.throws(() { (a = 5) || true; }, (error) => error is TypeError);
15
16 // No exceptions thrown.
17 false && (a = 5);
18 true || (a = 5);
19 }
20
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698