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

Unified Diff: tests/language/list_literal4_test.dart

Issue 10368004: Properly set the element type of literal lists. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/list_literal4_test.dart
===================================================================
--- tests/language/list_literal4_test.dart (revision 7336)
+++ tests/language/list_literal4_test.dart (working copy)
@@ -41,13 +41,20 @@
} catch (TypeError error) {
result += 100000;
}
+ try {
+ var m = <T>[0, 1]; // OK. Tested above.
+ List<String> ls = m; // m is a List<int>, not a List<String>.
+ } catch (TypeError error) {
+ result += 1000000;
+ }
+
return result;
}
}
main() {
var t = new ListLiteral4Test<int>();
- Expect.equals(110111, t.test());
+ Expect.equals(1110111, t.test());
}
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698