Skip to content

Commit

Permalink
Stop accepting null as a context in _fe_analyzer_shared.
Browse files Browse the repository at this point in the history
Now that the analyzer no longer makes a distinction between `null` and
`_` as contexts (https://dart-review.googlesource.com/c/sdk/+/357521),
no longer uses `null` to represent contexts
(https://dart-review.googlesource.com/c/sdk/+/357522), and no longer
passes `null` as a context to the shared analysis logic
(https://dart-review.googlesource.com/c/sdk/+/358662), we can safely
update the shared analysis logic so that it no longer accepts `null`
as a context.

Change-Id: I0512d59405255ef45497885e7668ebc3b12abf58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358800
Reviewed-by: Chloe Stefantsova <[email protected]>
Commit-Queue: Paul Berry <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
  • Loading branch information
stereotype441 authored and Commit Queue committed Apr 4, 2024
1 parent 5532568 commit 4e68819
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<Type> result =
Expand Down

0 comments on commit 4e68819

Please sign in to comment.