Skip to content

Commit 507f404

Browse files
stereotype441commit-bot@chromium.org
authored andcommitted
Flow analysis: always supply a type parameter for FunctionBodyAccess.
This reduces the risk of mistakes and avoids downcasts. Change-Id: I98f021e0dd6754ee499a08aabe4fee00d17501ac Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109744 Reviewed-by: Konstantin Shcheglov <[email protected]>
1 parent 851eaad commit 507f404

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/analyzer/lib/src/dart/resolver/flow_analysis.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class FlowAnalysis<Statement, Expression, Variable, Type> {
5050
final TypeOperations<Variable, Type> typeOperations;
5151

5252
/// The enclosing function body, used to check for potential mutations.
53-
final FunctionBodyAccess functionBody;
53+
final FunctionBodyAccess<Variable> functionBody;
5454

5555
/// The stack of states of variables that are not definitely assigned.
5656
final List<_State<Variable, Type>> _stack = [];
@@ -78,7 +78,7 @@ class FlowAnalysis<Statement, Expression, Variable, Type> {
7878
factory FlowAnalysis(
7979
NodeOperations<Expression> nodeOperations,
8080
TypeOperations<Variable, Type> typeOperations,
81-
FunctionBodyAccess functionBody,
81+
FunctionBodyAccess<Variable> functionBody,
8282
) {
8383
var emptySet = _VariableSet<Variable>._(
8484
List<Variable>(0),

0 commit comments

Comments
 (0)