virtualx-engine/modules/gdscript
Mitch Curtis 8f5ffeeacc Produce an error when a class has the same name as a Singleton
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.
2019-09-06 17:12:43 +02:00
..
doc_classes doc: Sync classref with current source 2019-08-29 15:33:52 +02:00
editor Use base Color() constructors instead of Color::html() 2019-07-08 21:17:10 +02:00
icons Add support for creating editor icons per module 2019-06-28 23:42:26 +03:00
language_server Improve code compeletion for virtual methods with signatures 2019-08-11 14:06:39 +08:00
config.py doc: Improve docs for Resource* classes 2019-06-18 20:07:26 +02:00
gdscript.cpp Make VarArg methods return types show up as Variant in API json 2019-08-26 16:36:51 +00:00
gdscript.h Parse more informations for code completion 2019-07-04 14:00:14 +08:00
gdscript_compiler.cpp Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", "modules/gdnative", "modules/gdscript" directories. 2019-08-09 11:13:24 +02:00
gdscript_compiler.h Fix GDScriptCompiler bugging out with identically-named inner class 2019-03-16 20:41:16 +02:00
gdscript_editor.cpp Try and show all the properties added with _get_property_list() when triggering completion. 2019-09-03 14:27:27 +02:00
gdscript_function.cpp Fix yield check in GDScriptFunction 2019-08-28 11:15:43 +03:00
gdscript_function.h Revert "Forbid implicit type conversion in GDScript" 2019-03-04 12:25:59 +01:00
gdscript_functions.cpp Add ord() function to return Unicode code point of a string of length one 2019-08-28 16:14:11 +02:00
gdscript_functions.h Add ord() function to return Unicode code point of a string of length one 2019-08-28 16:14:11 +02:00
gdscript_parser.cpp Produce an error when a class has the same name as a Singleton 2019-09-06 17:12:43 +02:00
gdscript_parser.h Add GDScript Language Protocol plugin 2019-08-11 13:30:15 +08:00
gdscript_tokenizer.cpp Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", "modules/gdnative", "modules/gdscript" directories. 2019-08-09 11:13:24 +02:00
gdscript_tokenizer.h Disallow using of both tabs and spaces for indentation in the same file 2019-07-26 21:24:34 +03:00
register_types.cpp GDScript: Disable LSP if either jsonrpc or websocket are disabled 2019-08-28 13:29:37 +02:00
register_types.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
SCsub GDScript: Disable LSP if either jsonrpc or websocket are disabled 2019-08-28 13:29:37 +02:00