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

Unified Diff: pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart

Issue 2903153006: Treat type inference context `dynamic` as equivalent to an empty context. (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
« no previous file with comments | « no previous file | pkg/front_end/test/fasta/strong.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart b/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart
index 32d872cc7e3401920322f94c57ed3ad3a40d323f..16beabb7bf8e4b37d3da6afa9aebed4077fb3836 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart
@@ -226,6 +226,13 @@ class TypeSchemaEnvironment extends TypeEnvironment {
List<DartType> actualTypes,
DartType returnContextType,
List<DartType> inferredTypes) {
+ if (returnContextType is DynamicType) {
+ // Analyzer treats a type context of `dynamic` as equivalent to an empty
+ // context. TODO(paulberry): this is not spec'ed anywhere; do we still
+ // want to do this?
+ returnContextType = null;
+ }
+
if (typeParametersToInfer.isEmpty) {
return;
}
« no previous file with comments | « no previous file | pkg/front_end/test/fasta/strong.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698