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

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

Issue 12082051: Perform substitution on the unaliased type of a typedef. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comment Created 7 years, 11 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 | « sdk/lib/_internal/compiler/implementation/dart_types.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/type_substitution_test.dart
diff --git a/tests/compiler/dart2js/type_substitution_test.dart b/tests/compiler/dart2js/type_substitution_test.dart
index af84ecc363e73deca3f1455af83052fb257aa9d1..0c4ee89259bd12db778ca13ce4543381dfa27e5a 100644
--- a/tests/compiler/dart2js/type_substitution_test.dart
+++ b/tests/compiler/dart2js/type_substitution_test.dart
@@ -238,4 +238,21 @@ void testTypeSubstitution() {
testSubstitution(compiler, arguments, parameters, "Typedef1c", "Typedef2c");
testSubstitution(compiler, arguments, parameters, "Typedef1d", "Typedef2d");
testSubstitution(compiler, arguments, parameters, "Typedef1e", "Typedef2e");
+
+ // Substitution in unalias.
+ DartType Typedef2_int_String = getType(compiler, "Typedef2a");
+ Expect.isNotNull(Typedef2_int_String);
+ DartType Function_int_String = getType(compiler, "Function2b");
+ Expect.isNotNull(Function_int_String);
+ DartType unalias1 = Typedef2_int_String.unalias(compiler);
+ Expect.equals(Function_int_String, unalias1,
+ '$Typedef2_int_String.unalias=$unalias1 != $Function_int_String');
+
+ DartType Typedef1 = getType(compiler, "Typedef1c");
+ Expect.isNotNull(Typedef1);
+ DartType Function_dynamic_dynamic = getType(compiler, "Function1c");
+ Expect.isNotNull(Function_dynamic_dynamic);
+ DartType unalias2 = Typedef1.unalias(compiler);
+ Expect.equals(Function_dynamic_dynamic, unalias2,
+ '$Typedef1.unalias=$unalias2 != $Function_dynamic_dynamic');
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/dart_types.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698