Fix usage of class_name in built-in scripts (no longer allowed)

This commit is contained in:
notgoyome
2025-06-22 00:56:56 +02:00
committed by Guillame Tran
parent 64596092ae
commit 6adf691cc5
+4
View File
@@ -996,6 +996,10 @@ void GDScriptParser::parse_class_name() {
current_class->fqcn = String(current_class->identifier->name);
}
if (script_path.begins_with("res://") && script_path.contains("::")) {
push_error(R"("class_name" isn't allowed in built-in scripts.)");
}
make_completion_context(COMPLETION_DECLARATION, current_class);
if (match(GDScriptTokenizer::Token::EXTENDS)) {