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

Side by Side Diff: tests/language_2/code_motion_crash_test.dart

Issue 3002573002: Migrating another batch of tests to dart 2. (Closed)
Patch Set: Removed library closure_type_test from test_file Created 3 years, 4 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 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 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 4
5 // Regression test for dart2js that used to crash during the 5 // Regression test for dart2js that used to crash during the
6 // [SsaCodeMotion] phase on this code. 6 // [SsaCodeMotion] phase on this code.
7 7
8 class A { 8 class A {
9 final finalField; 9 final finalField;
10 var field = 2; 10 var field = 2;
(...skipping 24 matching lines...) Expand all
35 // the call to [bar]. 35 // the call to [bar].
36 var c = a.finalField; 36 var c = a.finalField;
37 c.foo(); 37 c.foo();
38 38
39 // [e] does not get GVN'ed because the GVN phase sees [c.foo()] as 39 // [e] does not get GVN'ed because the GVN phase sees [c.foo()] as
40 // having side effects. 40 // having side effects.
41 var e = a.field; 41 var e = a.field;
42 if (d + e != 4) throw 'Test failed'; 42 if (d + e != 4) throw 'Test failed';
43 } 43 }
44 } 44 }
OLDNEW
« no previous file with comments | « tests/language_2/code_after_try_is_executed_test.dart ('k') | tests/language_2/comparison_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698