Bug: Variable and "My Block" name conflicts and duplicate "My Block" names allowed


Users can create “My Blocks” and variables that have the same name in mBlock 5, and can create multiple “My Blocks” with the same name. These cause errors when uploading the code using micropython. I’ve uploaded screenshots of the problems.

Proposed solutions:

  1. Check to see if name exists in Variables and My Blocks, and generate error if the name already exists (see screenshot)

  2. Auto-prefix Variables and My Blocks using “block_” and “var_” (for example) to avoid name conflicts (at least between variables and My Blocks) (see screenshot)