@@ -396,16 +396,8 @@ abstract class FlowAnalysis<
396396 /// A function parameter is always initialized, so [initialized] is `true` .
397397 ///
398398 /// 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});
409401
410402 /// Call this method after visiting a variable pattern in a non-assignment
411403 /// context (or a wildcard pattern).
@@ -1598,17 +1590,10 @@ class FlowAnalysisDebug<
15981590 Variable variable,
15991591 Type staticType, {
16001592 required bool initialized,
1601- bool skipDuplicateCheck = false ,
16021593 }) {
16031594 _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),
16121597 );
16131598 }
16141599
@@ -5493,11 +5478,10 @@ class _FlowAnalysisImpl<
54935478 Variable variable,
54945479 Type staticType, {
54955480 required bool initialized,
5496- bool skipDuplicateCheck = false ,
54975481 }) {
54985482 assert (staticType == operations.variableType (variable));
54995483 assert (
5500- _debugDeclaredVariables.add (variable) || skipDuplicateCheck ,
5484+ _debugDeclaredVariables.add (variable),
55015485 'Variable $variable already declared' ,
55025486 );
55035487 _current = _current.declare (
0 commit comments