Prevent local constant default value from incorrect override by a global
This commit is contained in:
parent
a24e870c71
commit
05331a5bb9
|
@ -781,6 +781,9 @@ static void _find_identifiers_in_class(const GDScriptParser::ClassNode *p_class,
|
||||||
if (p_only_functions) {
|
if (p_only_functions) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (r_result.has(member.constant->identifier->name)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
option = ScriptCodeCompletionOption(member.constant->identifier->name, ScriptCodeCompletionOption::KIND_CONSTANT);
|
option = ScriptCodeCompletionOption(member.constant->identifier->name, ScriptCodeCompletionOption::KIND_CONSTANT);
|
||||||
if (member.constant->initializer) {
|
if (member.constant->initializer) {
|
||||||
option.default_value = member.constant->initializer->reduced_value;
|
option.default_value = member.constant->initializer->reduced_value;
|
||||||
|
|
Loading…
Reference in New Issue