Skip to content

Commit 9a7d2b6

Browse files
committed
Make type classes work with refactor
1 parent fcb86a3 commit 9a7d2b6

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

modules/gdscript/gdscript_analyzer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,8 @@ GDScriptParser::DataType GDScriptAnalyzer::resolve_datatype(GDScriptParser::Type
934934
push_error(vformat(R"(Could not find nested type "%s" under base "%s".)", p_type->type_chain[1]->name, result.to_string()), p_type->type_chain[1]);
935935
return bad_type;
936936
}
937+
} else {
938+
p_type->type_chain[0]->set_datatype(result);
937939
}
938940

939941
if (!p_type->container_types.is_empty()) {

modules/gdscript/gdscript_parser.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3759,6 +3759,7 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_invalid_token(ExpressionNo
37593759
GDScriptParser::TypeNode *GDScriptParser::parse_type(bool p_allow_void) {
37603760
TypeNode *type = alloc_node<TypeNode>();
37613761
make_completion_context(p_allow_void ? COMPLETION_TYPE_NAME_OR_VOID : COMPLETION_TYPE_NAME, type);
3762+
make_refactor_rename_context(p_allow_void ? REFACTOR_RENAME_TYPE_TYPE_NAME_OR_VOID : REFACTOR_RENAME_TYPE_TYPE_NAME, type);
37623763
if (!match(GDScriptTokenizer::Token::IDENTIFIER)) {
37633764
if (match(GDScriptTokenizer::Token::VOID)) {
37643765
if (p_allow_void) {

0 commit comments

Comments
 (0)