pxt-microbit icon indicating copy to clipboard operation
pxt-microbit copied to clipboard

Expanding an array with the first entry as a parameter creates an empty parameter block

Open srietkerk opened this issue 5 months ago • 1 comments

To Reproduce

  1. Go to https://makecode.microbit.org/
  2. Open a project
  3. Create a function with parameters
  4. Create an array inside the function
  5. Put a parameter as the first entry in the array
  6. Expand the array to have more entries
  7. 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

Image Image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome

srietkerk avatar Jul 18 '25 17:07 srietkerk

This is number list and adding text to the number list will cause this issue. Unfortunately, we are strongly type. Valid bug though.

abchatra avatar Jul 18 '25 23:07 abchatra