-
-
Notifications
You must be signed in to change notification settings - Fork 260
Open
Labels
c: registerRegister classes, functions and other symbols to GDScriptRegister classes, functions and other symbols to GDScriptquality-of-lifeNo new functionality, but improves ergonomics/internalsNo new functionality, but improves ergonomics/internals
Description
Sometimes, users accidentally choose a name that conflicts with a built-in Godot name, or a registered symbol in a base class. They often cause non-obvious errors at runtime.
We should see if we can turn them into compile-time or startup-time errors. Startup-time is OK, if we don't want macro-hardcoded logic, so it would be forward-compatible to builders and more dynamic registrations. Either way, this would be a big improvement over the status quo.
These conflicts come in many forms:
-
Classes (IIRC already fails to register, not sure about error message)
-
#[func]definitions- virtual method names (e.g.
_ready) - other functions in the base
- virtual method names (e.g.
-
#[var]/#[export]properties- property of same name exists in the base class
- or the getters/setters exist as functions
-
#[signal] -
#[constant]
Metadata
Metadata
Assignees
Labels
c: registerRegister classes, functions and other symbols to GDScriptRegister classes, functions and other symbols to GDScriptquality-of-lifeNo new functionality, but improves ergonomics/internalsNo new functionality, but improves ergonomics/internals