Godot Engine – Multi-platform 2D and 3D game engine
GDScript: Add all early-applied annotations to outer class annotation list
Malcolm Anderson8fd32572f016
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cppindex a404b572a91..5d4034460a8 100644--- a/modules/gdscript/gdscript_parser.cpp+++ b/modules/gdscript/gdscript_parser.cpp@@ -737,9 +737,8 @@ void GDScriptParser::parse_program() {// Some annotations need to be resolved and applied in the parser.// The root class is not in any class, so `head->outer == nullptr`.annotation->apply(this, head, nullptr);- } else {- head->annotations.push_back(annotation);}+ head->annotations.push_back(annotation);} else if (annotation->applies_to(AnnotationInfo::STANDALONE)) {if (previous.type != GDScriptTokenizer::Token::NEWLINE) {push_error(R"(Expected newline after a standalone annotation.)");