summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_parser.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-05-21 10:59:59 +0200
committerGitHub <noreply@github.com>2020-05-21 10:59:59 +0200
commitaf366c7adf10cbf1f97eb51f6be9265126e19192 (patch)
tree9fe79c1e00298e310727dbec17078532f6a2532a /modules/gdscript/gdscript_parser.cpp
parente6ff562a4bd0d6332c561757505cc16503104b04 (diff)
parent7b1423a61ea6a5249d29ddbb3866ce815f16497c (diff)
Merge pull request #35900 from yamgent/unreachable
Fix false positive "Unreachable code" warning for loops
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r--modules/gdscript/gdscript_parser.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index fbb5f91139..ff10008b47 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -3167,7 +3167,6 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
if (error_set) {
return;
}
- p_block->has_return = cf_while->body->has_return;
p_block->statements.push_back(cf_while);
} break;
case GDScriptTokenizer::TK_CF_FOR: {
@@ -3308,7 +3307,6 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) {
if (error_set) {
return;
}
- p_block->has_return = cf_for->body->has_return;
p_block->statements.push_back(cf_for);
} break;
case GDScriptTokenizer::TK_CF_CONTINUE: {