mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Mono: Avoid invalid class names.
Disallow reserved keywords as class names and prefix base class with the Godot namespace if it's the same as the class name. Fixes #12483
This commit is contained in:
parent
aeb1c67b5b
commit
700d07cf7c
4 changed files with 33 additions and 2 deletions
|
|
@ -434,6 +434,13 @@ void ScriptCreateDialog::_path_changed(const String &p_path) {
|
|||
return;
|
||||
}
|
||||
|
||||
String path_error = ScriptServer::get_language(language_menu->get_selected())->validate_path(p);
|
||||
if (path_error != "") {
|
||||
_msg_path_valid(false, path_error);
|
||||
_update_dialog();
|
||||
return;
|
||||
}
|
||||
|
||||
/* All checks passed */
|
||||
|
||||
is_path_valid = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue