You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix a few GDScript warning messages for grammar and consistency
Regenerate test results Improve warning message for `INT_AS_ENUM_WITHOUT_CAST` Improve `REDUNDANT_AWAIT` message and regenerate tests Allow warning message for UNASSIGNED_VARIABLE_OP_ASSIGN to display specific operator Remove "being" from some messages to make them consistent and clearer Update expected test results Use Variant::get_operator_name for determining string representation of operator instead of big switch-case Update tests Update modules/gdscript/gdscript_warning.cpp Co-authored-by: Danil Alexeev <dalexeev12@yandex.ru> Update tests... again
This commit is contained in:
@@ -3011,7 +3011,7 @@ void GDScriptAnalyzer::reduce_assignment(GDScriptParser::AssignmentNode *p_assig
|
||||
GDScriptParser::IdentifierNode *id = static_cast<GDScriptParser::IdentifierNode *>(p_assignment->assignee);
|
||||
// Use == 1 here because this assignment was already counted in the beginning of the function.
|
||||
if (id->source == GDScriptParser::IdentifierNode::LOCAL_VARIABLE && id->variable_source && id->variable_source->assignments == 1) {
|
||||
parser->push_warning(p_assignment, GDScriptWarning::UNASSIGNED_VARIABLE_OP_ASSIGN, id->name);
|
||||
parser->push_warning(p_assignment, GDScriptWarning::UNASSIGNED_VARIABLE_OP_ASSIGN, id->name, Variant::get_operator_name(p_assignment->variant_op));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user