diff --git a/pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer.dart b/pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer.dart index a80d3a512c87..e92b566428ad 100644 --- a/pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer.dart +++ b/pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer.dart @@ -529,9 +529,9 @@ mixin TypeAnalyzer< /// [schema] is the type schema which should be used for type inference. /// /// Stack effect: pushes (Expression). - Type analyzeExpression(Expression node, TypeSchema? schema) { + Type analyzeExpression(Expression node, TypeSchema schema) { // Stack: () - if (schema == null || operations.typeSchemaIsDynamic(schema)) { + if (operations.typeSchemaIsDynamic(schema)) { schema = operations.unknownType; } ExpressionTypeAnalysisResult result =