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

Resolve Variable Conflict Issues When Adding Code From the Backpack #1375

Open
kchadha opened this issue Jul 18, 2018 · 0 comments
Open

Resolve Variable Conflict Issues When Adding Code From the Backpack #1375

kchadha opened this issue Jul 18, 2018 · 0 comments

Comments

@kchadha
Copy link
Contributor

kchadha commented Jul 18, 2018

Expected Behavior

Adding code from the backpack should not introduce any variable conflicts to the project the code is being added into.

Actual Behavior

There will be variable conflicts that arise that need to be addressed:

  • A variable reference being added conflicts with a global variable in the project.
    • Solution: merge the new variable with the existing global variable
  • A variable reference being added has no conflicts with existing variables
    • Solution: Create a new local variable if the block is being added to a sprite, otherwise create a new global variable, renaming if there are any variable name conflicts with local variables.
    • Note: In either case, we want to create the new variable immediately (instead of waiting to create that variable when that block is run).

/cc @paulkaplan

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

2 participants