Merge pull request #58185 from V-Sekai/explicit_variant_assignment_fix
This commit is contained in:
commit
bb8c4acdc9
1 changed files with 1 additions and 1 deletions
|
@ -1424,7 +1424,7 @@ void GDScriptAnalyzer::resolve_variable(GDScriptParser::VariableNode *p_variable
|
|||
parser->push_warning(p_variable->initializer, GDScriptWarning::NARROWING_CONVERSION);
|
||||
#endif
|
||||
}
|
||||
if (p_variable->initializer->get_datatype().is_variant()) {
|
||||
if (p_variable->initializer->get_datatype().is_variant() && !type.is_variant()) {
|
||||
// TODO: Warn unsafe assign.
|
||||
mark_node_unsafe(p_variable->initializer);
|
||||
p_variable->use_conversion_assign = true;
|
||||
|
|
Loading…
Reference in a new issue