### Godot version

Beta 17, master

### System information

Windows 11

### Issue description

Godot gets a hard crash while attempting to code-complete for member `const` of a class.

### Steps to reproduce

```GDScript
enum E { V1 }

const e := E
```

And then type a `.` after the last `E`, which triggers code hints/auto-completion for subscripts based on `E` and causes a hard crash.

Does not happen for `var e := E.V1`.

### Minimal reproduction project

See above.
parser->ignored_warning_codes.insert(ignored_warning);
		}
#endif 
		resolve_node(stmt);
#ifdef DEBUG_ENABLED
		parser->ignored_warning_codes = previously_ignored;
#endif 
		decide_suite_type(p_suite, stmt);
	}
}
void GDScriptAnalyzer::resolve_assignable(GDScriptParser::AssignableNode *p_assignable, const char *p_kind) {
	GDScriptParser::DataType type;
	type.kind = GDScriptParser::DataType::VARIANT;
	bool is_constant = p_assignable->type == GDScriptParser::Node::CONSTANT;
	GDScriptParser::DataType specified_type;
	bool has_specified_type = p_assignable->datatype_specifier != nullptr;
	if (has_specified_type) {
		specified_type = type_from_metatype(resolve_datatype(p_assignable->datatype_specifier));
		type = specified_type;
	}
	if (p_assignable->initializer != nullptr) {
		reduce_expression(p_assignable->initializer);
		if (p_assignable->initializer->type == GDScriptParser::Node::ARRAY) {
			GDScriptParser::ArrayNode *array = static_cast<GDScriptParser::ArrayNode *>(p_assignable->initializer);
			if (has_specified_type && specified_type.has_container_element_type()) {
				update_array_literal_element_type(array, specified_type.get_container_element_type());
			}
		}
		if (is_constant && !p_assignable->initializer->is_constant) {
			bool is_initializer_value_reduced = false;