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

parse error on annotation with empty arguments list #54279

Closed
Tracked by #40488
Scony opened this issue Oct 26, 2021 · 0 comments · Fixed by #72979
Closed
Tracked by #40488

parse error on annotation with empty arguments list #54279

Scony opened this issue Oct 26, 2021 · 0 comments · Fixed by #72979
Assignees
Milestone

Comments

@Scony
Copy link
Contributor

Scony commented Oct 26, 2021

Godot version

v4.0.dev.custom_build.3bebbcacd

System information

manjaro linux

Issue description

This script raises ERR_PARSE_ERROR:

@onready() var x

Not sure if this is a bug or expected behavior but as this syntax is more flexible I assume this is a bug.
@vnen should clarify before this goes any further though.

Details:

$ cat tests/potential-godot-bugs/annotation-w-empty-body.gd 
@onready() var x
$ godot4 --headless --check-only -s tests/potential-godot-bugs/annotation-w-empty-body.gd
Godot Engine v4.0.dev.custom_build.3bebbcacd - https://godotengine.org
 
ERROR: Parse Error: Unexpected ")" in class body.
   at: GDScript::reload (res://tests/potential-godot-bugs/annotation-w-empty-body.gd:1)
ERROR: Method/function failed. Returning: ERR_PARSE_ERROR
   at: reload (modules/gdscript/gdscript.cpp:839)

Steps to reproduce

Execute the above

Minimal reproduction project

No response

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

Successfully merging a pull request may close this issue.

4 participants