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

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

Issue 2341263002: Handle generic factory constructors in kernel_impact (Closed)
Patch Set: Updated cf. comment. 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/ssa/kernel_impact.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/kernel/impact_test.dart
diff --git a/tests/compiler/dart2js/kernel/impact_test.dart b/tests/compiler/dart2js/kernel/impact_test.dart
index 2621782c06573fe116eee4c20bd33fef445d8f4e..1bf2af7544ec9458ea8dd6536930a2ebf5d9337e 100644
--- a/tests/compiler/dart2js/kernel/impact_test.dart
+++ b/tests/compiler/dart2js/kernel/impact_test.dart
@@ -18,6 +18,8 @@ import '../serialization/test_helper.dart';
const Map<String, String> SOURCE = const <String, String>{
'main.dart': '''
+import 'helper.dart';
+
main() {
testEmpty();
testNull();
@@ -58,6 +60,10 @@ main() {
testInvokeIndexSet(null);
testAssert();
testAssertWithMessage();
+ testFactoryInvoke();
+ testFactoryInvokeGeneric();
+ testFactoryInvokeGenericRaw();
+ testFactoryInvokeGenericDynamic();
}
testEmpty() {}
@@ -154,7 +160,27 @@ testAssert() {
testAssertWithMessage() {
assert(true, 'ok');
}
-'''
+testFactoryInvoke() {
+ new Class.fact();
+}
+testFactoryInvokeGeneric() {
+ new GenericClass<int, String>.fact();
+}
+testFactoryInvokeGenericRaw() {
+ new GenericClass.fact();
+}
+testFactoryInvokeGenericDynamic() {
+ new GenericClass<dynamic, dynamic>.fact();
+}
+''',
+ 'helper.dart': '''
+class Class {
+ factory Class.fact() => null;
+}
+class GenericClass<X, Y> {
+ factory GenericClass.fact() => null;
+}
+''',
};
main(List<String> args) {
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_impact.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698