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

Unified Diff: pkg/analyzer/lib/src/generated/incremental_resolver.dart

Issue 1374313007: Fix for incremental resolver - changing field formal parameter name is sometimes a non-incremental … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | pkg/analyzer/test/generated/incremental_resolver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/incremental_resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/incremental_resolver.dart b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
index 1a587c73f12a886654207c2d1c79af0c1848a326..0d53c021eb3178a80ff5f031902a11634a8f3d65 100644
--- a/pkg/analyzer/lib/src/generated/incremental_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
@@ -493,6 +493,24 @@ class DeclarationMatcher extends RecursiveAstVisitor {
_assertCompatibleParameter(node.parameter, element);
} else if (node is FieldFormalParameter) {
_assertTrue(element.isInitializingFormal);
+ DartType parameterType = element.type;
+ if (node.type == null && node.parameters == null) {
+ FieldFormalParameterElement parameterElement = element;
+ if (!parameterElement.hasImplicitType) {
+ _assertTrue(parameterType == null || parameterType.isDynamic);
+ }
+ if (parameterElement.field != null) {
+ _assertEquals(node.identifier.name, element.name);
+ }
+ } else {
+ if (node.parameters != null) {
+ _assertTrue(parameterType is FunctionType);
+ FunctionType parameterFunctionType = parameterType;
+ _assertSameType(node.type, parameterFunctionType.returnType);
+ } else {
+ _assertSameType(node.type, parameterType);
+ }
+ }
_assertCompatibleParameters(node.parameters, element.parameters);
} else if (node is FunctionTypedFormalParameter) {
_assertFalse(element.isInitializingFormal);
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/incremental_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698