mirror of
https://github.com/godotengine/godot.git
synced 2026-08-02 20:34:27 -04:00
Usage of variables and parameters was previously done in the parser by incrementing usage whenever an identifier was parsed. This process was unaware of accessing member variables, which caused the warning to not be emitted when using a member variable with the same identifier as an unused local variable. This change moves the usage counting logic to `reduce_identifier` in the analyzer which only runs on actual expressions. The warning emission was also moved later into analyzing since the usage information is collected later.