Merge pull request #53946 from BenjaminNavarro/fix_dbg_check

This commit is contained in:
Rémi Verschelde 2021-10-18 10:40:55 +02:00 committed by GitHub
commit 850394bc07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -980,7 +980,7 @@ void GDScriptAnalyzer::resolve_class_body(GDScriptParser::ClassNode *p_class) {
has_valid_setter = true;
#ifdef DEBUG_ENABLED
if (member.variable->datatype.builtin_type == Variant::INT && setter_function->return_type->datatype.builtin_type == Variant::FLOAT) {
if (member.variable->datatype.builtin_type == Variant::FLOAT && setter_function->parameters[0]->datatype.builtin_type == Variant::INT) {
parser->push_warning(member.variable, GDScriptWarning::NARROWING_CONVERSION);
}
#endif