summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_analyzer.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-07-11 09:41:09 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-07-11 09:41:09 +0200
commitfe5d567917d0f39b155598d1a2c8e5033d18a87c (patch)
tree36a77b8a32141d64571d66cad22ac9b532337eb9 /modules/gdscript/gdscript_analyzer.cpp
parent1b49d6393d40ee724a44f5774c35adce4cb3271f (diff)
parent810fcc74318a4fcb12997d20d3738cd5e349430c (diff)
downloadredot-engine-fe5d567917d0f39b155598d1a2c8e5033d18a87c.tar.gz
Merge pull request #93942 from MikeSchulze/73525
Fix GDScript analyzer error when instantiating EditorPlugins.
Diffstat (limited to 'modules/gdscript/gdscript_analyzer.cpp')
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index a6b4bce000..67b40a6198 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -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) {