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

Unified Diff: tests/language/closure_in_constructor_test.dart

Issue 18181009: Make closures in constructor initializers read type variables directly. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add VM crash and modify test. Created 7 years, 6 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
Index: tests/language/closure_in_constructor_test.dart
diff --git a/tests/language/closure_in_constructor_test.dart b/tests/language/closure_in_constructor_test.dart
index 1975cdc58a75c75086b1d25b6718db5c3ab74864..66ee970196cb99a8920866b1b5d2a74c12719526 100644
--- a/tests/language/closure_in_constructor_test.dart
+++ b/tests/language/closure_in_constructor_test.dart
@@ -19,4 +19,8 @@ class A<T> {
main() {
Expect.isTrue((new A.factory()).closure() is List);
Expect.isTrue((new A()).closure() is List);
+ Expect.isTrue((new A<int>.factory()).closure() is List<int>);
+ Expect.isTrue((new A<int>()).closure() is List<int>);
+ Expect.isFalse((new A<int>.factory()).closure() is List<String>);
+ Expect.isFalse((new A<int>()).closure() is List<String>);
}

Powered by Google App Engine
This is Rietveld 408576698