Properly allow completion on variable initializer arguments, closes #9359

This commit is contained in:
Juan Linietsky 2017-09-29 19:43:31 -03:00
parent d4e20555e8
commit 0a5799fb43

View file

@ -1952,7 +1952,6 @@ static void _find_call_arguments(GDCompletionContext &context, const GDParser::N
//make sure identifier exists... //make sure identifier exists...
const GDParser::IdentifierNode *id = static_cast<const GDParser::IdentifierNode *>(op->arguments[1]); const GDParser::IdentifierNode *id = static_cast<const GDParser::IdentifierNode *>(op->arguments[1]);
if (op->arguments[0]->type == GDParser::Node::TYPE_SELF) { if (op->arguments[0]->type == GDParser::Node::TYPE_SELF) {
//self, look up //self, look up
@ -2021,7 +2020,7 @@ static void _find_call_arguments(GDCompletionContext &context, const GDParser::N
base = script->get_native(); base = script->get_native();
} else if (nc.is_valid()) { } else if (nc.is_valid()) {
if (context.function && !context.function->_static) { if (!(context.function && context.function->_static)) {
GDCompletionIdentifier ci; GDCompletionIdentifier ci;
ci.type = Variant::OBJECT; ci.type = Variant::OBJECT;