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

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

Issue 2995763003: Fix deferred bug: when type argument is never instantiated (Closed)
Patch Set: add status file 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
Index: tests/compiler/dart2js_extra/deferred/uninstantiated_type_variable_lib.dart
diff --git a/tests/compiler/dart2js_extra/deferred/uninstantiated_type_variable_lib.dart b/tests/compiler/dart2js_extra/deferred/uninstantiated_type_variable_lib.dart
new file mode 100644
index 0000000000000000000000000000000000000000..2af788d3d426f178ccbfeb6bf09ad06c89f0ac99
--- /dev/null
+++ b/tests/compiler/dart2js_extra/deferred/uninstantiated_type_variable_lib.dart
@@ -0,0 +1,26 @@
+// 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.
+
+// All of these types are considered instantiated because we create an instance
+// of [C].
+
+class A {}
+
+class Box<T> {
+ int value;
+}
+
+class B<T> extends A {
+ final box = new Box<T>();
+}
+
+class C extends B<N> {}
+
+// N is not instantiated, but used as a type argument in C and indirectly in a
+// Box<N>.
+// If we don't mark it as part of the output unit of C, we accidentally add it
+// to the main output unit. However, A is in the output unit of C so we fail
+// when trying to finalize the declaration of N while loading the main output
+// unit.
+class N extends A {}

Powered by Google App Engine
This is Rietveld 408576698