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

Unified Diff: tests/compiler/dart2js/kernel/impact_test.dart

Issue 2361783002: Handle calls to redirecting factories. (Closed)
Patch Set: Created 4 years, 3 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 | « pkg/compiler/lib/src/kernel/kernel_visitor.dart ('k') | tests/compiler/dart2js/kernel/visitor_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/kernel/impact_test.dart
diff --git a/tests/compiler/dart2js/kernel/impact_test.dart b/tests/compiler/dart2js/kernel/impact_test.dart
index 230820ffeb0878add32d7e893fbe4d70e907f7a9..5eca98b1f4a7f6fd587d6bcfa5e0667610e4aa6b 100644
--- a/tests/compiler/dart2js/kernel/impact_test.dart
+++ b/tests/compiler/dart2js/kernel/impact_test.dart
@@ -74,6 +74,10 @@ main() {
testFactoryInvokeGeneric();
testFactoryInvokeGenericRaw();
testFactoryInvokeGenericDynamic();
+ testRedirectingFactoryInvoke();
+ testRedirectingFactoryInvokeGeneric();
+ testRedirectingFactoryInvokeGenericRaw();
+ testRedirectingFactoryInvokeGenericDynamic();
}
testEmpty() {}
@@ -198,13 +202,29 @@ testFactoryInvokeGenericRaw() {
testFactoryInvokeGenericDynamic() {
new GenericClass<dynamic, dynamic>.fact();
}
+testRedirectingFactoryInvoke() {
+ new Class.redirect();
+}
+testRedirectingFactoryInvokeGeneric() {
+ new GenericClass<int, String>.redirect();
+}
+testRedirectingFactoryInvokeGenericRaw() {
+ new GenericClass.redirect();
+}
+testRedirectingFactoryInvokeGenericDynamic() {
+ new GenericClass<dynamic, dynamic>.redirect();
+}
''',
'helper.dart': '''
class Class {
+ Class.generative();
factory Class.fact() => null;
+ factory Class.redirect() = Class.generative;
}
class GenericClass<X, Y> {
+ GenericClass.generative();
factory GenericClass.fact() => null;
+ factory GenericClass.redirect() = GenericClass.generative;
}
''',
};
« no previous file with comments | « pkg/compiler/lib/src/kernel/kernel_visitor.dart ('k') | tests/compiler/dart2js/kernel/visitor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698