diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-07-18 13:36:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-18 13:36:51 +0200 |
commit | 73a67f93092239fa35adda4675187549f9c1f903 (patch) | |
tree | 53554b11e8890a17eb65a9af1bacf70d3c8830e1 | |
parent | 1c6148aa86c4a3b8d5c292da69ffacc2f3a46eb8 (diff) | |
parent | 52781535a366a466e24ded338805f76cac639f75 (diff) |
Merge pull request #63125 from cdemirer/fix-parameter-shadowing-class-member
Check for parameters shadowing class members
-rw-r--r-- | modules/gdscript/gdscript_compiler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index af8e4b3746..e36252ada5 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 } |