diff options
author | ocean (they/them) <anvilfolk@gmail.com> | 2023-09-12 11:11:09 -0400 |
---|---|---|
committer | ocean (they/them) <anvilfolk@gmail.com> | 2023-09-12 11:18:33 -0400 |
commit | d330f5642ee892d34ad31867bcb0cad1cad9e538 (patch) | |
tree | b8377100382e286acf421027fd4f1885f8cf86c6 /modules/gdscript/gdscript_compiler.cpp | |
parent | 98b50eb3083094a352b36b184d7b60b77ad982fe (diff) | |
download | redot-engine-d330f5642ee892d34ad31867bcb0cad1cad9e538.tar.gz |
GDScript: Fix compilation of expressions compiling other classes
This PR is part of ongoing work on fixing cyclic dependencies in the GDScript
compiler.
Diffstat (limited to 'modules/gdscript/gdscript_compiler.cpp')
-rw-r--r-- | modules/gdscript/gdscript_compiler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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; |