diff options
author | cdemirer <41021322+cdemirer@users.noreply.github.com> | 2022-07-18 00:28:27 +0300 |
---|---|---|
committer | cdemirer <41021322+cdemirer@users.noreply.github.com> | 2022-07-18 00:28:27 +0300 |
commit | 52781535a366a466e24ded338805f76cac639f75 (patch) | |
tree | 93ec6bdced16ae4683ebcf9c7d061a9f74254cae /modules | |
parent | e3a8ab68ce7497b3752d29965c6a54c50d548144 (diff) |
Check for parameters shadowing class members
Diffstat (limited to 'modules')
-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 } |