pxt-microbit
pxt-microbit copied to clipboard
Expanding an array with the first entry as a parameter creates an empty parameter block
To Reproduce
- Go to https://makecode.microbit.org/
- Open a project
- Create a function with parameters
- Create an array inside the function
- Put a parameter as the first entry in the array
- Expand the array to have more entries
- See the error
Expected behavior Expanding an array should not cause errors in your program. I'm not sure what the desired behavior here would be.. Maybe just make the next array entry be the name of the parameter? Or just keep it empty? We just don't want the program to error if an array is expanded with a parameter as it's first entry.
Screenshots
Desktop (please complete the following information):
- OS: Windows 11
- Browser: Chrome
This is number list and adding text to the number list will cause this issue. Unfortunately, we are strongly type. Valid bug though.