Incorporate comments from an earlier code review
Changes to some Kernel type-inference judgments were inadvertently
committed without first addressing review comments. Original review:
https://dart-review.googlesource.com/c/sdk/+/60921
Change-Id: I773c000b115345fd4ee4a3859cb3c1659d8814aa
Reviewed-on: https://dart-review.googlesource.com/61241
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
index cdaa360..329585f 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
@@ -2339,7 +2339,7 @@
ShadowTypeInferrer inferrer,
Factory<Expression, Statement, Initializer, Type> factory,
DartType typeContext) {
- return (inferrer.thisType ?? const DynamicType());
+ return inferredType = inferrer.thisType ?? const DynamicType();
}
}
@@ -2847,7 +2847,8 @@
ShadowTypeInferrer inferrer,
Factory<Expression, Statement, Initializer, Type> factory,
DartType typeContext) {
- return inferredType = super.getStaticType(inferrer.typeSchemaEnvironment);
+ return inferredType =
+ inferrer.typeSchemaEnvironment.futureType(const DynamicType());
}
}
@@ -2863,7 +2864,7 @@
ShadowTypeInferrer inferrer,
Factory<Expression, Statement, Initializer, Type> factory,
DartType typeContext) {
- return inferredType = super.getStaticType(inferrer.typeSchemaEnvironment);
+ return inferredType = inferrer.typeSchemaEnvironment.objectType;
}
}