Sarge
May 8, 2024, 5:28pm
1
Using variable_get shadow in extensions for the any[]
defaults to “item” instead of user defined name. This is kind of inconvenient for making extension. @richard is this a known issue? Filed bug in detail here:
opened 02:29PM - 08 May 24 UTC
**Describe the bug**
When setting a default value for the `variables_get` shado… w 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[]) {
}
}
3. Test the extension
4. 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
3 Likes
yeah, ran into this on stream a little while back. i don’t know if it was filed though
3 Likes
i am in the presence of GODS