summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_analyzer.cpp
diff options
context:
space:
mode:
authorAdam Scott <ascott.ca@gmail.com>2023-01-14 15:58:34 -0500
committerAdam Scott <ascott.ca@gmail.com>2023-01-15 19:19:25 -0500
commit48e041458f66e964327ec4499111830e0a1a666d (patch)
tree598db1da0d94d2ac68b9e2961b7dbad86f2db349 /modules/gdscript/gdscript_analyzer.cpp
parent91fedb60de6011434938499a9d4a7d4fd1cd4f06 (diff)
Fix cyclic reference errors while reducing identifiers.
Co-authored-by: Dmitrii Maganov <vonagam@gmail.com>
Diffstat (limited to 'modules/gdscript/gdscript_analyzer.cpp')
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index 1b488d560c..3d74445ff2 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -2910,8 +2910,8 @@ void GDScriptAnalyzer::reduce_identifier_from_base_set_class(GDScriptParser::Ide
p_identifier->set_datatype(p_identifier_datatype);
Error err = OK;
- GDScript *scr = GDScriptCache::get_full_script(p_identifier_datatype.script_path, err).ptr();
- ERR_FAIL_COND_MSG(err != OK, "Error while getting full script.");
+ GDScript *scr = GDScriptCache::get_shallow_script(p_identifier_datatype.script_path, err).ptr();
+ ERR_FAIL_COND_MSG(err != OK, vformat(R"(Error while getting cache for script "%s".)", p_identifier_datatype.script_path));
scr = scr->find_class(p_identifier_datatype.class_type->fqcn);
p_identifier->reduced_value = scr;
p_identifier->is_constant = true;