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

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

Issue 2985293002: Add optional FunctionType.positionalParameterNames and use them to resynthesize function-type forma… (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 022921658d6a1a4564873162f86933f35e8c9a15..fcf847e07b0e55c75d78c935caef94513de6997c 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -6756,12 +6756,24 @@ class C extends D {
}
''');
if (isStrongMode) {
- checkElementText(library, r'''
+ if (isSharedFrontEnd) {
+ // Front-end copies FunctionType instances, which means that if it has
+ // parameter names in superclass, then we have names also in the
+ // subclass.
+ checkElementText(library, r'''
+import 'a.dart';
+class C extends D {
+ void f(int x, int g(String s)) {}
+}
+''');
+ } else {
+ checkElementText(library, r'''
import 'a.dart';
class C extends D {
void f(int x, (String) → int g) {}
}
''');
+ }
} else {
checkElementText(library, r'''
import 'a.dart';

Powered by Google App Engine
This is Rietveld 408576698