Skip to content

Commit 89f1316

Browse files
committed
Fix "extends" issue.
1 parent 62f24f5 commit 89f1316

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/gdscript/gdscript_parser.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,7 @@ void GDScriptParser::parse_program() {
787787
case GDScriptTokenizer::Token::CLASS_NAME:
788788
PUSH_PENDING_ANNOTATIONS_TO_HEAD;
789789
advance();
790+
refactor_rename_register(REFACTOR_RENAME_TYPE_CLASS, current_class);
790791
if (head->identifier != nullptr) {
791792
push_error(R"("class_name" can only be used once.)");
792793
} else {
@@ -796,6 +797,7 @@ void GDScriptParser::parse_program() {
796797
case GDScriptTokenizer::Token::EXTENDS:
797798
PUSH_PENDING_ANNOTATIONS_TO_HEAD;
798799
advance();
800+
refactor_rename_register(REFACTOR_RENAME_TYPE_CLASS, current_class);
799801
if (head->extends_used) {
800802
push_error(R"("extends" can only be used once.)");
801803
} else {
@@ -811,6 +813,7 @@ void GDScriptParser::parse_program() {
811813
if (current.literal.get_type() == Variant::STRING) {
812814
// Allow strings in class body as multiline comments.
813815
advance();
816+
refactor_rename_register(REFACTOR_RENAME_TYPE_CLASS, current_class);
814817
if (!match(GDScriptTokenizer::Token::NEWLINE)) {
815818
push_error("Expected newline after comment string.");
816819
}

0 commit comments

Comments
 (0)