Merge pull request #63125 from cdemirer/fix-parameter-shadowing-class-member

Check for parameters shadowing class members
This commit is contained in:
Rémi Verschelde 2022-07-18 13:36:51 +02:00 committed by GitHub
commit 73a67f9309
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ bool GDScriptCompiler::_is_class_member_property(CodeGen &codegen, const StringN
return false; return false;
} }
if (codegen.locals.has(p_name)) { if (codegen.parameters.has(p_name) || codegen.locals.has(p_name)) {
return false; //shadowed return false; //shadowed
} }