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] [regression] complex constant parse error #52031

Closed
Scony opened this issue Aug 23, 2021 · 1 comment
Closed

[GDScript 2.0] [regression] complex constant parse error #52031

Scony opened this issue Aug 23, 2021 · 1 comment

Comments

@Scony
Copy link
Contributor

Scony commented Aug 23, 2021

Godot version

master #fb176d5f6e6dc2b43c630a041a8ab7d737173ec4

System information

manjaro linux

Issue description

following script:

const X = {
	'x': [],
}

yields

SCRIPT ERROR: Parse Error: Initializer for a constant must be a constant expression.
          at: GDScript::reload (res://tests/potential-godot-bugs/const-dict.gd:1)
ERROR: Method/function failed. Returning: ERR_PARSE_ERROR
   at: reload (modules/gdscript/gdscript.cpp:840)

while it was working in Godot 3.x

Steps to reproduce

compile

Minimal reproduction project

No response

@lyuma
Copy link
Contributor

lyuma commented Aug 25, 2021

Closing as duplicate of #50285

@lyuma lyuma closed this as completed Aug 25, 2021
@Calinou Calinou removed this from the 4.0 milestone Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants