@@ -396,16 +396,8 @@ abstract class FlowAnalysis<
396
396
/// A function parameter is always initialized, so [initialized] is `true` .
397
397
///
398
398
/// In debug builds, an assertion will normally verify that no variable gets
399
- /// declared more than once. This assertion may be disabled by passing `true`
400
- /// to [skipDuplicateCheck] .
401
- ///
402
- /// TODO(paulberry): try to remove all uses of skipDuplicateCheck
403
- void declare (
404
- Variable variable,
405
- Type staticType, {
406
- required bool initialized,
407
- bool skipDuplicateCheck = false ,
408
- });
399
+ /// declared more than once.
400
+ void declare (Variable variable, Type staticType, {required bool initialized});
409
401
410
402
/// Call this method after visiting a variable pattern in a non-assignment
411
403
/// context (or a wildcard pattern).
@@ -1598,17 +1590,10 @@ class FlowAnalysisDebug<
1598
1590
Variable variable,
1599
1591
Type staticType, {
1600
1592
required bool initialized,
1601
- bool skipDuplicateCheck = false ,
1602
1593
}) {
1603
1594
_wrap (
1604
- 'declare($variable , $staticType , '
1605
- 'initialized: $initialized , skipDuplicateCheck: $skipDuplicateCheck )' ,
1606
- () => _wrapped.declare (
1607
- variable,
1608
- staticType,
1609
- initialized: initialized,
1610
- skipDuplicateCheck: skipDuplicateCheck,
1611
- ),
1595
+ 'declare($variable , $staticType , initialized: $initialized )' ,
1596
+ () => _wrapped.declare (variable, staticType, initialized: initialized),
1612
1597
);
1613
1598
}
1614
1599
@@ -5493,11 +5478,10 @@ class _FlowAnalysisImpl<
5493
5478
Variable variable,
5494
5479
Type staticType, {
5495
5480
required bool initialized,
5496
- bool skipDuplicateCheck = false ,
5497
5481
}) {
5498
5482
assert (staticType == operations.variableType (variable));
5499
5483
assert (
5500
- _debugDeclaredVariables.add (variable) || skipDuplicateCheck ,
5484
+ _debugDeclaredVariables.add (variable),
5501
5485
'Variable $variable already declared' ,
5502
5486
);
5503
5487
_current = _current.declare (
0 commit comments