File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -773,14 +773,14 @@ namespace {
773773 if (thenBranch.check ) {
774774 // The condition is only "known" because of an earlier assumption, so the
775775 // skipped else block could still modify the value -> lower to possible
776- if (analyzer-> isConditional () && hasElse && analyzeScope (elseBranch.endBlock ).isModified () &&
776+ if (!condTok-> hasKnownIntValue () && hasElse && analyzeScope (elseBranch.endBlock ).isModified () &&
777777 !analyzer->lowerToPossible ())
778778 return Break (Analyzer::Terminate::Bail);
779779 if (updateScope (thenBranch.endBlock , depth - 1 ) == Progress::Break)
780780 return Break ();
781781 } else if (elseBranch.check ) {
782782 // Likewise the skipped then block could still modify the value
783- if (analyzer-> isConditional () && analyzeScope (thenBranch.endBlock ).isModified () &&
783+ if (!condTok-> hasKnownIntValue () && analyzeScope (thenBranch.endBlock ).isModified () &&
784784 !analyzer->lowerToPossible ())
785785 return Break (Analyzer::Terminate::Bail);
786786 if (elseBranch.endBlock && updateScope (elseBranch.endBlock , depth - 1 ) == Progress::Break)
You can’t perform that action at this time.
0 commit comments