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

Unified Diff: tests/compiler/dart2js_extra/23853_test.dart

Issue 1244513003: dart2js: fix dependency tracking for deferred loading when types are only used (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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/23853_test.dart
diff --git a/tests/compiler/dart2js_extra/23853_test.dart b/tests/compiler/dart2js_extra/23853_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..3bf67843b79dd5a1ab3f52d794cbf3050cccdc86
--- /dev/null
+++ b/tests/compiler/dart2js_extra/23853_test.dart
@@ -0,0 +1,20 @@
+// 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.
+
+// Regression for issue 23853: if a type was mainly used in a deferred library,
+// but could be used in a generic type in the main library
+
+import 'import_a_23853.dart';
floitsch 2015/07/17 09:22:25 Use descriptive file-names. You can still mention
Siggi Cherem (dart-lang) 2015/07/17 15:34:49 Done.
+import 'import_b_23853.dart' deferred as b;
+
+class TypeLiteral<T> {
+ Type get type => T;
+}
+
+main() {
+ // This line failed with a runtime error prior to the bug fix:
+ new TypeLiteral<A<Object>>().type;
+
+ b.loadLibrary().then((_) => b.createA());
+}

Powered by Google App Engine
This is Rietveld 408576698