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

Unified Diff: tests/compiler/dart2js_extra/deferred/interface_type_variable_test.dart

Issue 3000843002: Add dependencies to type variables used in the super type declaration, but do (Closed)
Patch Set: v2 Created 3 years, 4 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/compiler/dart2js_extra/deferred/interface_type_variable_lib.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js_extra/deferred/interface_type_variable_test.dart
diff --git a/tests/compiler/dart2js_extra/deferred/interface_type_variable_test.dart b/tests/compiler/dart2js_extra/deferred/interface_type_variable_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..df522dffb23b11d3c351625432a7aada0d1745e0
--- /dev/null
+++ b/tests/compiler/dart2js_extra/deferred/interface_type_variable_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2017, 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.
+
+import 'package:expect/expect.dart';
+import 'interface_type_variable_lib.dart' deferred as lib;
+
+/// Regression test: if a type variable is used, but not instantiated, it still
+/// needs to be mapped to the deferred unit where it is used.
+///
+/// If not, we may include it in the main unit and may not see that the base
+/// class is not added to the main unit.
+main() {
+ lib.loadLibrary().then((_) {
+ lib.doCheck(dontInline(new lib.C()));
+ });
+}
+
+@NoInline()
+dontInline(x) => x;
« no previous file with comments | « tests/compiler/dart2js_extra/deferred/interface_type_variable_lib.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698