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

This commit is contained in:
notgoyome authored and Guillame Tran committed 2026-03-25 15:02:05 +09:00
1 parent 64596092ae
commit 6adf691cc5
1 file changed
+4
+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)) {