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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Issue 2886443003: Minor type inference fixes. (Closed)
Patch Set: Created 3 years, 7 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/front_end/lib/src/fasta/kernel/body_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 6a6740c1e9a62c212c1abc0bc0a8d48f3254345d..926bfb6eb4876a40647a239702aa2a2cf1d38ced 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -1570,7 +1570,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
nit("Ignoring type on 'this' parameter '${name.name}'.",
thisKeyword.charOffset);
}
- type = field.target.type ?? const DynamicType();
+ type = field.target.type;
variable = astFactory.variableDeclaration(
name.name, name.token, functionNestingLevel,
type: type,
@@ -1584,7 +1584,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
}
variable ??= astFactory.variableDeclaration(
name.name, name.token, functionNestingLevel,
- type: type ?? const DynamicType(),
+ type: type,
initializer: name.initializer,
isFinal: isFinal,
isConst: isConst);
« no previous file with comments | « pkg/analyzer/test/src/context/mock_sdk.dart ('k') | pkg/front_end/lib/src/fasta/kernel/kernel_formal_parameter_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698