mirror of
https://github.com/godotengine/godot.git
synced 2025-01-18 20:40:57 +08:00
8f5ffeeacc
If you somehow end up with a Singleton.gd that looks like this: extends Node class_name Singleton func foo(): pass You will get an error when using it in another file: extends Node2D func _init(): # Parser Error: Non-static function "foo" can only be called from an instance. Singleton.foo() This error is confusing. This patch ensures that an error on the class_name line will be produced: Parse Error: The class "Singleton" conflicts with the AutoLoad singleton of the same name, and is therefore redundant. Remove the class_name declaration to fix this error. Fixes #28187. |
||
---|---|---|
.. | ||
doc_classes | ||
editor | ||
icons | ||
language_server | ||
config.py | ||
gdscript_compiler.cpp | ||
gdscript_compiler.h | ||
gdscript_editor.cpp | ||
gdscript_function.cpp | ||
gdscript_function.h | ||
gdscript_functions.cpp | ||
gdscript_functions.h | ||
gdscript_parser.cpp | ||
gdscript_parser.h | ||
gdscript_tokenizer.cpp | ||
gdscript_tokenizer.h | ||
gdscript.cpp | ||
gdscript.h | ||
register_types.cpp | ||
register_types.h | ||
SCsub |