From e6ba6092a6c122c49db13152cf75e7e134174761 Mon Sep 17 00:00:00 2001 From: orklah Date: Mon, 20 Sep 2021 12:54:08 +0200 Subject: [PATCH] turn inside_loop to true for do...while --- src/Psalm/Internal/Analyzer/Statements/Block/DoAnalyzer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Psalm/Internal/Analyzer/Statements/Block/DoAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Block/DoAnalyzer.php index fee2e529c..1bda8a338 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Block/DoAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Block/DoAnalyzer.php @@ -31,6 +31,7 @@ class DoAnalyzer ): void { $do_context = clone $context; $do_context->break_types[] = 'loop'; + $do_context->inside_loop = true; $codebase = $statements_analyzer->getCodebase();