1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Merge pull request #93942 from MikeSchulze/73525

Fix GDScript analyzer error when instantiating EditorPlugins.
This commit is contained in:
Rémi Verschelde
2024-07-11 09:41:09 +02:00
3 changed files with 17 additions and 1 deletions

View File

@@ -5180,7 +5180,7 @@ bool GDScriptAnalyzer::get_function_signature(GDScriptParser::Node *p_source, bo
if (!class_exists(base_native)) {
push_error(vformat("Native class %s used in script doesn't exist or isn't exposed.", base_native), p_source);
return false;
} else if (p_is_constructor && !ClassDB::can_instantiate(base_native)) {
} else if (p_is_constructor && ClassDB::is_abstract(base_native)) {
if (p_base_type.kind == GDScriptParser::DataType::CLASS) {
push_error(vformat(R"(Class "%s" cannot be constructed as it is based on abstract native class "%s".)", p_base_type.class_type->fqcn.get_file(), base_native), p_source);
} else if (p_base_type.kind == GDScriptParser::DataType::SCRIPT) {