### 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->errors.clear();
	Error err = OK;
	err = resolve_inheritance();
	if (err) {
		return err;
	}
	
	for (GDScriptParser::AnnotationNode *&E : parser->head->annotations) {
		resolve_annotation(E);
		E->apply(parser, parser->head);
	}
	resolve_interface();
	resolve_body();
	if (!parser->errors.is_empty()) {
		return ERR_PARSE_ERROR;
	}
	return resolve_dependencies();
}
GDScriptAnalyzer::GDScriptAnalyzer(GDScriptParser *p_parser) {
	parser = p_parser;
}