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

Unified Diff: dart/type_variable_function_type_test.dart

Issue 57773002: Repro for OOM bug in test.dart (applies to r29345). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | « dart/sdk/lib/_internal/lib/js_rti.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/type_variable_function_type_test.dart
diff --git a/dart/type_variable_function_type_test.dart b/dart/type_variable_function_type_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..a832fd80f1e74b27e1edb45ccf7f9aee9ba8d833
--- /dev/null
+++ b/dart/type_variable_function_type_test.dart
@@ -0,0 +1,19 @@
+typedef T Func<T>();
+
+class Foo<S> {
+ m(x) => x is Func<S>;
+}
+
+class Bar<T> {
+ f() {
+ T local() {}
+ return local;
+ }
+}
+
+void main() {
+ var x = new Foo<List<String>>();
+ if (new DateTime.now().millisecondsSinceEpoch == 42) x = new Foo<int>();
+ print(x.m(new Bar<String>().f()));
+ print(x.m(new Bar<List<String>>().f()));
+}
« no previous file with comments | « dart/sdk/lib/_internal/lib/js_rti.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698