You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add has_extension() method to String
This commit is contained in:
@@ -492,7 +492,7 @@ Error GDScriptAnalyzer::resolve_class_inheritance(GDScriptParser::ClassNode *p_c
|
||||
}
|
||||
} else if (ProjectSettings::get_singleton()->has_autoload(name) && ProjectSettings::get_singleton()->get_autoload(name).is_singleton) {
|
||||
const ProjectSettings::AutoloadInfo &info = ProjectSettings::get_singleton()->get_autoload(name);
|
||||
if (info.path.get_extension().to_lower() != GDScriptLanguage::get_singleton()->get_extension()) {
|
||||
if (!info.path.has_extension(GDScriptLanguage::get_singleton()->get_extension())) {
|
||||
push_error(vformat(R"(Singleton %s is not a GDScript.)", info.name), id);
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user