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

Unified Diff: tests/language/deferred_regression_22995_test.dart

Issue 1019923005: Dart2js deferred loading. Follow types of functions when calculating dependencies. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added test for generic type Created 5 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 | « tests/language/deferred_regression_22995_lib.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/deferred_regression_22995_test.dart
diff --git a/tests/language/deferred_regression_22995_test.dart b/tests/language/deferred_regression_22995_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..054b50734bee66446c4291fc1a1faac1d645ff14
--- /dev/null
+++ b/tests/language/deferred_regression_22995_test.dart
@@ -0,0 +1,34 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that closurizing a function implies a dependency on its type.
+
+import "package:expect/expect.dart";
+
+import 'deferred_regression_22995_lib.dart' deferred as lib;
+
+class A {}
+class B {}
+class C {}
+
+typedef Ti(int x);
+typedef TB(B x);
+typedef TTi(Ti x);
+typedef Tg<T>(T x);
+
+class T {
+ fA(A a) => null;
+ fTB(TB a) => null;
+ fTgC(Tg<C> a) => null;
+}
+
+main() {
+ Expect.isFalse(new T().fA is Ti);
+ Expect.isFalse(new T().fTB is TTi);
+ Expect.isFalse(new T().fTgC is TTi);
+ lib.loadLibrary().then((_) {
+ lib.foofoo();
+ });
+}
+
« no previous file with comments | « tests/language/deferred_regression_22995_lib.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698