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

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

Issue 158733003: Fix language tests wrt. warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix tests and status. Created 6 years, 10 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 | « tests/language/core_type_check_test.dart ('k') | tests/language/crash_6725_test.dart » ('j') | 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) 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 a crash in dart2js. 5 // Regression test for a crash in dart2js.
6 6
7 part of crash_6725;
8
7 class Fisk { 9 class Fisk {
8 it1(x) { 10 it1(x) {
9 // "key" is unresolved and caused a crash in dart2js. 11 // "key" is unresolved and caused a crash in dart2js.
10 // This is the original example the user reported. 12 // This is the original example the user reported.
11 for (key in x) { 13 for (key in x) {
12 print(key); 14 print(key);
13 } 15 }
14 } 16 }
15 17
16 it2(x) { 18 it2(x) {
(...skipping 11 matching lines...) Expand all
28 } 30 }
29 } 31 }
30 } 32 }
31 33
32 class SubFisk extends Fisk { 34 class SubFisk extends Fisk {
33 var key; 35 var key;
34 var length; 36 var length;
35 var fisk; 37 var fisk;
36 } 38 }
37 39
38 main() { 40 test() {
39 Fisk f = new SubFisk(); 41 Fisk f = new SubFisk();
40 var m = (x) { 42 var m = (x) {
41 for (undeclared in x) { 43 for (undeclared in x) {
42 print(undeclared); 44 print(undeclared);
43 } 45 }
44 }; 46 };
45 if (new DateTime.now().millisecondsSinceEpoch == 42) { 47 if (new DateTime.now().millisecondsSinceEpoch == 42) {
46 f = null; 48 f = null;
47 m = (x) {}; 49 m = (x) {};
48 } 50 }
(...skipping 13 matching lines...) Expand all
62 throw 'f.fisk != 42 (${f.fisk})'; 64 throw 'f.fisk != 42 (${f.fisk})';
63 } 65 }
64 66
65 try { 67 try {
66 m([87, 42]); 68 m([87, 42]);
67 throw 'NoSuchMethodError expected'; 69 throw 'NoSuchMethodError expected';
68 } on NoSuchMethodError { 70 } on NoSuchMethodError {
69 // Expected. 71 // Expected.
70 } 72 }
71 } 73 }
OLDNEW
« no previous file with comments | « tests/language/core_type_check_test.dart ('k') | tests/language/crash_6725_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698