summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_analyzer.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2023-01-16 22:15:21 +0100
committerGitHub <noreply@github.com>2023-01-16 22:15:21 +0100
commit585a9344548dd56142ec4480d584daaa2950a689 (patch)
treed3303ad00e5b30ef1179adf035757dff8d0e9afe /modules/gdscript/gdscript_analyzer.cpp
parent5f7ac9fe101a437f3e71a70fec0dc02105172d6f (diff)
parent48e041458f66e964327ec4499111830e0a1a666d (diff)
downloadredot-engine-585a9344548dd56142ec4480d584daaa2950a689.tar.gz
Merge pull request #71434 from adamscott/fix-reduce-identifier-from-base-class-script-retrieval
Fix cyclic reference errors while reducing identifiers
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;