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

Using variables_get shadow in extensions forces value to be "item" instead of user-defined with any[] parameter

Open sargedev opened this issue 9 months ago • 0 comments

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:

  1. Create a project with and link it to a GitHub repository
  2. Add the following code:
//% block="test"
namespace test {
    //% block="test $array"
    //% array.shadow=variables_get
    //% array.defl=list
    export function test(array: any[]) {

    }
}
  1. Test the extension
  2. 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 image image

Desktop (please complete the following information):

  • OS: Windows 10 Home
  • Browser: Chrome (64x)
  • Version: 124.0.6367.119

sargedev avatar May 08 '24 14:05 sargedev