### Godot version

v4.0custom_build[fcba87e]

### System information

Windows 10

### Issue description

Error when trying to call a method with a ternary operator.

### Steps to reproduce

```
extends Node

func _ready() -> void:
	test() if true else test()

func test() -> void:
	pass
```
[fcba87e](https://github.com/godotengine/godot/commit/fcba87e696d58912838d8a4a6987b10efa28e78f) - `Line 4:Cannot get return value of call to "test()" because it returns "void".`

v4.0beta10 - works fine

### Minimal reproduction project

[ternary_bug.zip](https://github.com/godotengine/godot/files/10368477/ternary_bug.zip)

SuiteNode *body = alloc_node<SuiteNode>();
	body->parent_function = current_function;
	body->parent_block = current_suite;
	SuiteNode *previous_suite = current_suite;
	current_suite = body;
	parse_function_signature(function, body, "lambda");
	current_suite = previous_suite;
	bool previous_in_lambda = in_lambda;
	in_lambda = true;
	function->body = parse_suite("lambda declaration", body, true);
	complete_extents(function);
	complete_extents(lambda);
	pop_multiline();
	if (multiline_context) {
		
		while (check(GDScriptTokenizer::Token::DEDENT) || check(GDScriptTokenizer::Token::INDENT) || check(GDScriptTokenizer::Token::NEWLINE)) {
			current = tokenizer.scan(); 
		}
		tokenizer.pop_expression_indented_block();
	}
	current_function = previous_function;
	in_lambda = previous_in_lambda;
	lambda->function = function;
	return lambda;
}
GDScriptParser::ExpressionNode *GDScriptParser::parse_yield(ExpressionNode *p_previous_operand, bool p_can_assign) {
	push_error(R"("yield" was removed in Godot 4.0. Use "await" instead.)");
	return nullptr;
}
GDScriptParser::ExpressionNode *GDScriptParser::parse_invalid_token(ExpressionNode *p_previous_operand, bool p_can_assign) {