### 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.
if (other_parser->errors.size() > error_count) {
			push_error(vformat(R"(Could not resolve member "%s".)", member.get_name()), p_source);
		}
		return;
	}
	
	if (!p_class->base_type.is_resolving()) {
		Error err = resolve_class_inheritance(p_class);
		if (err) {
			return;
		}
	}
	GDScriptParser::ClassNode *previous_class = parser->current_class;
	parser->current_class = p_class;
	GDScriptParser::DataType resolving_datatype;
	resolving_datatype.kind = GDScriptParser::DataType::RESOLVING;
	{
		switch (member.type) {
			case GDScriptParser::ClassNode::Member::VARIABLE: {
				check_class_member_name_conflict(p_class, member.variable->identifier->name, member.variable);
				member.variable->set_datatype(resolving_datatype);
				resolve_variable(member.variable, false);
				
				for (GDScriptParser::AnnotationNode *&E : member.variable->annotations) {
					resolve_annotation(E);
					E->apply(parser, member.variable);
				}
			} break;
			case GDScriptParser::ClassNode::Member::CONSTANT: {
				check_class_member_name_conflict(p_class, member.constant->identifier->name, member.constant);