From d330f5642ee892d34ad31867bcb0cad1cad9e538 Mon Sep 17 00:00:00 2001 From: "ocean (they/them)" Date: Tue, 12 Sep 2023 11:11:09 -0400 Subject: GDScript: Fix compilation of expressions compiling other classes This PR is part of ongoing work on fixing cyclic dependencies in the GDScript compiler. --- modules/gdscript/gdscript_compiler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/gdscript/gdscript_compiler.cpp') diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index fae7861539..d4c671cc64 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -402,7 +402,8 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code String global_class_path = ScriptServer::get_global_class_path(identifier); if (ResourceLoader::get_resource_type(global_class_path) == "GDScript") { Error err = OK; - res = GDScriptCache::get_full_script(global_class_path, err); + // Should not need to pass p_owner since analyzer will already have done it. + res = GDScriptCache::get_shallow_script(global_class_path, err); if (err != OK) { _set_error("Can't load global class " + String(identifier), p_expression); r_error = ERR_COMPILATION_FAILED; -- cgit v1.2.3