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

Unified Diff: pkg/analyzer/test/src/summary/resynthesize_common.dart

Issue 2991723002: Resynthesize FunctionType(s) from Kernel. (Closed)
Patch Set: Created 3 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: pkg/analyzer/test/src/summary/resynthesize_common.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index dfeff70b60e22d3aae56dbc872a968a7c223145c..7eff2b72c4aa8c377a546fedc791868a0783e426 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -3515,6 +3515,26 @@ dynamic foo() {}
}
}
+ test_const_reference_topLevelFunction_generic() async {
+ var library = await checkLibrary(r'''
+R foo<P, R>(P p) {}
+const V = foo;
+''');
+ if (isStrongMode) {
+ checkElementText(library, r'''
+const <P,R>(P) → R V =
+ foo/*location: test.dart;foo*/;
+R foo<P, R>(P p) {}
+''');
+ } else {
+ checkElementText(library, r'''
+const dynamic V =
+ foo/*location: test.dart;foo*/;
+R foo<P, R>(P p) {}
+''');
+ }
+ }
+
test_const_reference_topLevelFunction_imported() async {
addLibrarySource('/a.dart', r'''
foo() {}
« no previous file with comments | « pkg/analyzer/lib/src/kernel/resynthesize.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698