pxt-arcade
pxt-arcade copied to clipboard
Using variables_get shadow in extensions forces value to be "item" instead of user-defined with any[] parameter
Describe the bug
When setting a default value for the variables_get
shadow for a parameter of type any[]
, the variable name is set to item instead of the default value set by the user. This syntax works for other datatypes
To Reproduce Steps to reproduce the behavior:
- Create a project with and link it to a GitHub repository
- Add the following code:
//% block="test"
namespace test {
//% block="test $array"
//% array.shadow=variables_get
//% array.defl=list
export function test(array: any[]) {
}
}
- Test the extension
- The block present in the
test
drawer is "test [item]"
Expected behavior The parameter in the block drawer is supposed to be named list.
Screenshots
Desktop (please complete the following information):
- OS: Windows 10 Home
- Browser: Chrome (64x)
- Version: 124.0.6367.119