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

Trying to modify const Dictionary results in confusing error #44443

Closed
KoBeWi opened this issue Dec 17, 2020 · 3 comments
Closed

Trying to modify const Dictionary results in confusing error #44443

KoBeWi opened this issue Dec 17, 2020 · 3 comments

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Dec 17, 2020

Godot version:

fb2465b

Issue description:

const a = {}

func _ready() -> void:
	a["test"] = 1

This results in Cannot get index "test" from "{}". (parse error)

If I'm not supposed to modify const Dictionary, the error should clearly say so.

@KoBeWi KoBeWi added this to the 4.0 milestone Dec 17, 2020
@ThakeeNathees
Copy link
Contributor

there was already an issue for this: #44241

@KoBeWi
Copy link
Member Author

KoBeWi commented Jan 3, 2021

It's not the same issue. In my case it works when I do var a = {}

@YuriSizov
Copy link
Contributor

This should be clear after #71051.

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

3 participants