mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Add has_extension() method to String
This commit is contained in:
parent
ca452113d4
commit
a33ae0be0e
29 changed files with 46 additions and 48 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue