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

Redefine var results in an error #4918

Merged
merged 1 commit into from
Jan 14, 2017
Merged

Conversation

jkb0o
Copy link
Contributor

@jkb0o jkb0o commented May 30, 2016

Error raised if redefine

  • function argument
  • for-loop argument
  • local-scope var

Affects #3730

Well, there is still a dirty hack with cf_for->body->variables.push_back(id->name);. It is the only simple way Ive found for protect for-loop var from being redefined.

And I'm pretty sure I've missed something important =/

Error rised if redefine
- function argument
- for-loop argument
- local-scope var

Affects godotengine#3730
@reduz
Copy link
Member

reduz commented Jun 11, 2016

it makes sense that this would be an error, but it would probably break a lot of people's code to fix
let's fix for 3.0 when compatibility breakage is expected

@reduz reduz modified the milestones: 3.0, 2.1 Jun 11, 2016
@neikeq neikeq changed the title [GDScript] Redefine var results in an error Redefine var results in an error Jun 11, 2016
@akien-mga
Copy link
Member

Maybe we could merge a version that raises a warning, and only make it a blocking error in 3.0? To let people know about the need to fix their code in 2.1 already.

@akien-mga
Copy link
Member

We're now working on Godot 3.0, this could be considered for merging again.

Copy link
Contributor

@bojidar-bg bojidar-bg left a comment

Choose a reason for hiding this comment

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

Looks good by me

@reduz reduz merged commit 7924f08 into godotengine:master Jan 14, 2017
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.

4 participants