Open
Description
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