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 while parsing the annotation corner-case #54280

Open
Tracked by #40488
Scony opened this issue Oct 26, 2021 · 0 comments · May be fixed by #54852
Open
Tracked by #40488

parse error while parsing the annotation corner-case #54280

Scony opened this issue Oct 26, 2021 · 0 comments · May be fixed by #54852

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 parse error:

pass;pass  # ok
@onready var x;pass  # ok
@onready;var y;pass  # no-ok

So it looks like the standalone annotation being a part of the semicolon-separated statement list is not handled.

Details:

$ cat tests/potential-godot-bugs/annotation-w-semicolon-corner-case.gd 
pass;pass  # ok
@onready var x;pass  # ok
@onready;var y;pass  # no-ok
$ godot4 --headless --check-only -s tests/potential-godot-bugs/annotation-w-semicolon-corner-case.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-semicolon-corner-case.gd:3)
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
Status: Fix pending review
Development

Successfully merging a pull request may close this issue.

3 participants