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

Unified Diff: pkg/analyzer/lib/src/task/strong_mode.dart

Issue 2710943007: Issue 28862. Implement type inference for invokeConstructor with field formal parameter. (Closed)
Patch Set: Created 3 years, 10 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/analyzer/lib/src/summary/link.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_ast_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/strong_mode.dart
diff --git a/pkg/analyzer/lib/src/task/strong_mode.dart b/pkg/analyzer/lib/src/task/strong_mode.dart
index 866d17bc9bb041d7142c84b676a6257f2de4cab6..284a31ad55cc6386e4caa930421d87215029c06f 100644
--- a/pkg/analyzer/lib/src/task/strong_mode.dart
+++ b/pkg/analyzer/lib/src/task/strong_mode.dart
@@ -239,7 +239,7 @@ class InstanceMemberInferrer {
void _inferConstructorFieldFormals(ConstructorElement element) {
for (ParameterElement p in element.parameters) {
- if (p is FieldFormalParameterElement) {
+ if (p is FieldFormalParameterElementImpl) {
_inferFieldFormalParameter(p);
}
}
@@ -375,10 +375,10 @@ class InstanceMemberInferrer {
}
}
- void _inferFieldFormalParameter(FieldFormalParameterElement element) {
+ void _inferFieldFormalParameter(FieldFormalParameterElementImpl element) {
FieldElement field = element.field;
if (field != null && element.hasImplicitType) {
- (element as FieldFormalParameterElementImpl).type = field.type;
+ element.type = field.type;
}
}
« no previous file with comments | « pkg/analyzer/lib/src/summary/link.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_ast_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698