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

Disallow assignment to constants and expressions #7390

Merged
merged 1 commit into from
Jan 2, 2017

Conversation

bojidar-bg
Copy link
Contributor

Fixes #6221, fixes #6824

@@ -2014,7 +2023,7 @@ void GDParser::_parse_block(BlockNode *p_block,bool p_static) {
} break;
default: {

Node *expression = _parse_and_reduce_expression(p_block,p_static,false,true);
Node *expression = _parse_and_reduce_expression(p_block,p_static,true,true);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure why this was left to false (it is p_reduce_const), would be nice if @reduz confirms 😃

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say copy paste mistake :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akien-mga You think so? It is never true in the other parts of the code 😆

Let's see if we break anything though...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

turning back to false fixes #7412

@akien-mga akien-mga merged commit caddbbe into godotengine:master Jan 2, 2017
@akien-mga akien-mga modified the milestones: 2.2, 3.0 Jan 2, 2017
akien-mga added a commit that referenced this pull request Jan 2, 2017
@bojidar-bg bojidar-bg deleted the gdscript-assign-error branch March 30, 2017 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GDScript doesn't throw errors for assigning to unassignable expressions Constants are not very constant
3 participants