|
@@ -3360,12 +3360,8 @@ void GDScriptAnalyzer::reduce_call(GDScriptParser::CallNode *p_call, bool p_is_a
|
|
parser->push_warning(p_call, GDScriptWarning::RETURN_VALUE_DISCARDED, p_call->function_name);
|
|
parser->push_warning(p_call, GDScriptWarning::RETURN_VALUE_DISCARDED, p_call->function_name);
|
|
}
|
|
}
|
|
|
|
|
|
- if (method_flags.has_flag(METHOD_FLAG_STATIC) && !is_constructor && !base_type.is_meta_type && !(is_self && static_context)) {
|
|
|
|
- String caller_type = String(base_type.native_type);
|
|
|
|
-
|
|
|
|
- if (caller_type.is_empty()) {
|
|
|
|
- caller_type = base_type.to_string();
|
|
|
|
- }
|
|
|
|
|
|
+ if (method_flags.has_flag(METHOD_FLAG_STATIC) && !is_constructor && !base_type.is_meta_type && !is_self) {
|
|
|
|
+ String caller_type = base_type.to_string();
|
|
|
|
|
|
parser->push_warning(p_call, GDScriptWarning::STATIC_CALLED_ON_INSTANCE, p_call->function_name, caller_type);
|
|
parser->push_warning(p_call, GDScriptWarning::STATIC_CALLED_ON_INSTANCE, p_call->function_name, caller_type);
|
|
}
|
|
}
|