@@ -361,7 +361,7 @@ Error GDScriptAnalyzer::resolve_class_inheritance(GDScriptParser::ClassNode *p_c
361361 push_error (vformat (R"( Class "%s" hides a built-in type.)" , class_name), p_class->identifier );
362362 } else if (class_exists (class_name)) {
363363 push_error (vformat (R"( Class "%s" hides a native class.)" , class_name), p_class->identifier );
364- } else if (ScriptServer::is_global_class (class_name) && (ScriptServer::get_global_class_path (class_name) != parser->script_path || p_class != parser->head )) {
364+ } else if (ScriptServer::is_global_class (class_name) && (! GDScript::is_equal_gdscript_paths ( ScriptServer::get_global_class_path (class_name), parser->script_path ) || p_class != parser->head )) {
365365 push_error (vformat (R"( Class "%s" hides a global script class.)" , class_name), p_class->identifier );
366366 } else if (ProjectSettings::get_singleton ()->has_autoload (class_name) && ProjectSettings::get_singleton ()->get_autoload (class_name).is_singleton ) {
367367 push_error (vformat (R"( Class "%s" hides an autoload singleton.)" , class_name), p_class->identifier );
@@ -425,7 +425,7 @@ Error GDScriptAnalyzer::resolve_class_inheritance(GDScriptParser::ClassNode *p_c
425425 if (ScriptServer::is_global_class (name)) {
426426 String base_path = ScriptServer::get_global_class_path (name);
427427
428- if (base_path == parser->script_path ) {
428+ if (GDScript::is_equal_gdscript_paths ( base_path, parser->script_path ) ) {
429429 base = parser->head ->get_datatype ();
430430 } else {
431431 Ref<GDScriptParserRef> base_parser = get_parser_for (base_path);
@@ -698,7 +698,7 @@ GDScriptParser::DataType GDScriptAnalyzer::resolve_datatype(GDScriptParser::Type
698698 result.builtin_type = Variant::OBJECT;
699699 result.native_type = first;
700700 } else if (ScriptServer::is_global_class (first)) {
701- if (parser->script_path == ScriptServer::get_global_class_path (first)) {
701+ if (GDScript::is_equal_gdscript_paths ( parser->script_path , ScriptServer::get_global_class_path (first) )) {
702702 result = parser->head ->get_datatype ();
703703 } else {
704704 String path = ScriptServer::get_global_class_path (first);
0 commit comments