microsoft / microsoft/pxt-microbit

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

Open
#6,518 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P2
Dominant language
TypeScript
Stars
804
Forks
721
Avg merge
2d 9h
Merged PRs (30d)
2

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.