GDScript: Count usages of member variables.

Otherwise private member variables will always lead to UNUSED_PRIVATE_CLASS_VARIABLE.
This commit is contained in:
ZuBsPaCe 2021-09-03 07:44:46 +02:00
parent a160a95ea6
commit c76ad6b158

View file

@ -2411,6 +2411,7 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
case GDScriptParser::ClassNode::Member::VARIABLE:
p_identifier->source = GDScriptParser::IdentifierNode::MEMBER_VARIABLE;
p_identifier->variable_source = member.variable;
member.variable->usages += 1;
break;
case GDScriptParser::ClassNode::Member::FUNCTION:
resolve_function_signature(member.function);