From 52781535a366a466e24ded338805f76cac639f75 Mon Sep 17 00:00:00 2001 From: cdemirer <41021322+cdemirer@users.noreply.github.com> Date: Mon, 18 Jul 2022 00:28:27 +0300 Subject: [PATCH] Check for parameters shadowing class members --- modules/gdscript/gdscript_compiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index af8e4b37461..e36252ada5a 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -43,7 +43,7 @@ bool GDScriptCompiler::_is_class_member_property(CodeGen &codegen, const StringN return false; } - if (codegen.locals.has(p_name)) { + if (codegen.parameters.has(p_name) || codegen.locals.has(p_name)) { return false; //shadowed }