Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading error message when attempting to create an instance of a singleton #80728

Closed
aaronfranke opened this issue Aug 17, 2023 · 1 comment · Fixed by #82098
Closed

Misleading error message when attempting to create an instance of a singleton #80728

aaronfranke opened this issue Aug 17, 2023 · 1 comment · Fixed by #82098

Comments

@aaronfranke
Copy link
Member

Godot version

0511f9d 4.2.dev (current master as of writing)

System information

macOS 13.4.1 (this issue affects all systems)

Issue description

When trying to construct a built-in singleton (ex: DisplayServer.new()), this error message is misleading:

Screenshot 2023-08-17 at 11 30 46 AM

The error message says it's abstract, which seems like it should indicate that you need to use a derived class. However, this is a singleton, and you are meant to use its methods directly. Instead of the current error text, it should say something about how it's a singleton and you should use its methods directly.

Steps to reproduce

Write DisplayServer.new() in the script editor.

Minimal reproduction project

Since it's one line I am not going to bother making a MRP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants