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); |