@@ -2579,9 +2579,9 @@ Error GDScriptCompiler::_populate_class_members(GDScript *p_script, const GDScri
25792579 }
25802580 } else if (!base->is_valid ()) {
25812581 Error err = OK ;
2582- Ref<GDScript> base_root = GDScriptCache::get_full_script (base->path , err, p_script->path );
2582+ Ref<GDScript> base_root = GDScriptCache::get_shallow_script (base->path , err, p_script->path );
25832583 if (err) {
2584- _set_error (vformat (R"( Could not compile base class "%s" from "%s": %s)" , base->fully_qualified_name , base->path , error_names[err]), nullptr );
2584+ _set_error (vformat (R"( Could not parse base class "%s" from "%s": %s)" , base->fully_qualified_name , base->path , error_names[err]), nullptr );
25852585 return err;
25862586 }
25872587 if (base_root.is_valid ()) {
@@ -2591,7 +2591,12 @@ Error GDScriptCompiler::_populate_class_members(GDScript *p_script, const GDScri
25912591 _set_error (vformat (R"( Could not find class "%s" in "%s".)" , base->fully_qualified_name , base->path ), nullptr );
25922592 return ERR_COMPILATION_FAILED ;
25932593 }
2594- ERR_FAIL_COND_V (!base->is_valid () && !base->reloading , ERR_BUG );
2594+
2595+ err = _populate_class_members (base.ptr (), p_class->base_type .class_type , p_keep_state);
2596+ if (err) {
2597+ _set_error (vformat (R"( Could not populate class members of base class "%s" in "%s".)" , base->fully_qualified_name , base->path ), nullptr );
2598+ return err;
2599+ }
25952600 }
25962601
25972602 p_script->base = base;
@@ -2968,7 +2973,7 @@ Error GDScriptCompiler::compile(const GDScriptParser *p_parser, GDScript *p_scri
29682973 GDScriptCache::add_static_script (p_script);
29692974 }
29702975
2971- return GDScriptCache::finish_compiling (main_script->get_path () );
2976+ return GDScriptCache::finish_compiling (main_script->path );
29722977}
29732978
29742979String GDScriptCompiler::get_error () const {
0 commit comments