You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
use correct error for unused bind match, suppress with underscore
This commit is contained in:
@@ -1657,8 +1657,8 @@ void GDScriptAnalyzer::resolve_match_pattern(GDScriptParser::PatternNode *p_matc
|
||||
p_match_pattern->bind->set_datatype(result);
|
||||
#ifdef DEBUG_ENABLED
|
||||
is_shadowing(p_match_pattern->bind, "pattern bind");
|
||||
if (p_match_pattern->bind->usages == 0) {
|
||||
parser->push_warning(p_match_pattern->bind, GDScriptWarning::UNASSIGNED_VARIABLE, p_match_pattern->bind->name);
|
||||
if (p_match_pattern->bind->usages == 0 && !String(p_match_pattern->bind->name).begins_with("_")) {
|
||||
parser->push_warning(p_match_pattern->bind, GDScriptWarning::UNUSED_VARIABLE, p_match_pattern->bind->name);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user