Merge pull request #57205 from TechnoPorg/variant-template-cast

Allow method binds to take Object subclasses as arguments
This commit is contained in:
Rémi Verschelde 2022-01-27 23:46:37 +01:00 committed by GitHub
commit e6caaf4c80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 64 additions and 78 deletions

View file

@ -585,7 +585,7 @@ void GDScriptWorkspace::completion(const lsp::CompletionParams &p_params, List<S
stack.push_back(owner_scene_node);
while (!stack.is_empty()) {
current = stack.pop_back();
current = Object::cast_to<Node>(stack.pop_back());
Ref<GDScript> script = current->get_script();
if (script.is_valid() && script->get_path() == path) {
break;