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

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

Issue 11125005: Support for type dynamic in VM (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « tests/language/instanceof3_test.dart ('k') | tests/language/pseudo_kw_illegal_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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // Unresolved imported symbols are handled differently in production mode and 5 // Unresolved imported symbols are handled differently in production mode and
6 // check modes. In this test, the function myFunc is malformed, because 6 // check modes. In this test, the function myFunc is malformed, because
7 // lib12.Library13 is not resolved. 7 // lib12.Library13 is not resolved.
8 // In checked mode, the assignment type check throws a run time type error. 8 // In checked mode, the assignment type check throws a run time type error.
9 // In production, no assignment type checks are performed. 9 // In production, no assignment type checks are performed.
10 10
(...skipping 19 matching lines...) Expand all
30 myFunc i = 0; 30 myFunc i = 0;
31 } on TypeError catch (error) { 31 } on TypeError catch (error) {
32 got_type_error = true; 32 got_type_error = true;
33 } 33 }
34 // Type error in checked mode only. 34 // Type error in checked mode only.
35 Expect.isTrue(got_type_error == isCheckedMode()); 35 Expect.isTrue(got_type_error == isCheckedMode());
36 } 36 }
37 { 37 {
38 bool got_type_error = false; 38 bool got_type_error = false;
39 try { 39 try {
40 // In production mode, malformed myFunc is mapped to (Dynamic) => Dynamic. 40 // In production mode, malformed myFunc is mapped to (dynamic) => dynamic.
41 Expect.isTrue(((int x) => x) is myFunc); 41 Expect.isTrue(((int x) => x) is myFunc);
42 } on TypeError catch (error) { 42 } on TypeError catch (error) {
43 got_type_error = true; 43 got_type_error = true;
44 } 44 }
45 // Type error in checked mode only. 45 // Type error in checked mode only.
46 Expect.isTrue(got_type_error == isCheckedMode()); 46 Expect.isTrue(got_type_error == isCheckedMode());
47 } 47 }
48 } 48 }
OLDNEW
« no previous file with comments | « tests/language/instanceof3_test.dart ('k') | tests/language/pseudo_kw_illegal_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698