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

Unified Diff: tests/compiler/dart2js/unparser_test.dart

Issue 10875009: [dart2dart] Fix type variables for interfaces and default classes if they are in different libs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « lib/compiler/implementation/dart_backend/placeholder_collector.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/unparser_test.dart
diff --git a/tests/compiler/dart2js/unparser_test.dart b/tests/compiler/dart2js/unparser_test.dart
index d3d87c00d5bb9f81530cec99087d4079e11c9322..8c063823beacd7332b7328e19f6638d4bf0a0d8e 100644
--- a/tests/compiler/dart2js/unparser_test.dart
+++ b/tests/compiler/dart2js/unparser_test.dart
@@ -604,6 +604,32 @@ main() {
(String result) { Expect.equals(expectedResult, result); });
}
+testInterfaceDefaultAnotherLib() {
+ var librarySrc = '''
+#library('mylib');
+class C<T> {
+ factory I() {}
+}
+''';
+ var mainSrc = '''
+#import('mylib.dart', prefix: 'mylib');
+
+interface I<T> default mylib.C<T> {
+ I();
+}
+
+main() {
+ new I();
+}
+''';
+ var expectedResult =
+ 'class C<T>{factory I(){}}'
+ 'interface I<T> default C<T>{I();}'
+ 'main(){new I();}';
+ testDart2DartWithLibrary(mainSrc, librarySrc,
+ (String result) { Expect.equals(expectedResult, result); });
+}
+
main() {
testSignedConstants();
testGenericTypes();
@@ -638,4 +664,5 @@ main() {
testTypeVariablesAreRenamed();
testClassTypeArgumentBound();
testDoubleMains();
+ testInterfaceDefaultAnotherLib();
}
« no previous file with comments | « lib/compiler/implementation/dart_backend/placeholder_collector.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698