microsoft / microsoft/pxt-microbit
Expanding an array with the first entry as a parameter creates an empty parameter block
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 804
- Forks
- 721
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 2
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in the MakeCode micro:bit editor using the seven steps in the report: create a parameterized function, place its first parameter in an array, then expand the array. Compare the resulting empty parameter block with the expected behavior described, and use the screenshots to confirm the failure; done means expanding the array no longer produces an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100