diff --git a/src/Analyser/NodeScopeResolver.php b/src/Analyser/NodeScopeResolver.php
index <HASH>..<HASH> 100644
--- a/src/Analyser/NodeScopeResolver.php
+++ b/src/Analyser/NodeScopeResolver.php
@@ -380,7 +380,7 @@ class NodeScopeResolver
 			}
 
 			foreach ($node->loop as $loopExpr) {
-				$scope = $this->lookForAssigns($scope, $loopExpr, TrinaryLogic::createYes());
+				$scope = $this->lookForAssigns($scope, $loopExpr, TrinaryLogic::createMaybe());
 			}
 		} elseif ($node instanceof Array_) {
 			$scope = $scope->exitFirstLevelStatements();
diff --git a/tests/PHPStan/Analyser/NodeScopeResolverTest.php b/tests/PHPStan/Analyser/NodeScopeResolverTest.php
index <HASH>..<HASH> 100644
--- a/tests/PHPStan/Analyser/NodeScopeResolverTest.php
+++ b/tests/PHPStan/Analyser/NodeScopeResolverTest.php
@@ -129,7 +129,7 @@ class NodeScopeResolverTest extends \PHPStan\TestCase
 			[
 				$testScope,
 				'f',
-				TrinaryLogic::createYes(),
+				TrinaryLogic::createMaybe(),
 				'int',
 			],
 			[
Variables assigned in the last part of the for loop are not defined during the first run of the loop