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

GDScript 2.0: getter of untyped variables can return nothing on some code paths #63393

Open
mieldepoche opened this issue Jul 24, 2022 · 1 comment · May be fixed by #79363
Open

GDScript 2.0: getter of untyped variables can return nothing on some code paths #63393

mieldepoche opened this issue Jul 24, 2022 · 1 comment · May be fixed by #79363

Comments

@mieldepoche
Copy link
Contributor

Godot version

4.0.alpha12

System information

linux

Issue description

Getters have to return something explicitely in each code path.
This check if not performed for getters of untyped variables:

# raises an error in the editor
var x: int:
    get:
        pass

# does not
var y:
    get:
        pass

Steps to reproduce

see above

Minimal reproduction project

No response

@akien-mga
Copy link
Member

Still reproducible in 4.0 RC 1.

@akien-mga akien-mga modified the milestones: 4.0, 4.1 Feb 13, 2023
@YuriSizov YuriSizov modified the milestones: 4.1, 4.2 Jun 22, 2023
@garychia garychia linked a pull request Jul 12, 2023 that will close this issue
@dalexeev dalexeev modified the milestones: 4.2, 4.x Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: In Progress
5 participants