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

Array isn't getting inferred in python

Open livcheerful opened this issue 5 years ago • 4 comments

Describe the bug This is a user reported bug from Twitter - https://twitter.com/JudianneTeach/status/1328887954333261825

The script is trying to remove an item from an array. After fixing an initial syntax error, we still can't pop an item out of the array.

To Reproduce Steps to reproduce the behavior:

  1. Open this script: https://makecode.microbit.org/_7rgXkF8yD0Kj
  2. There's an error - can't find function "letter_bag.pop", even though pop is a supported array function

image image

micro:bit version (please complete the following information): not hardware related

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome

livcheerful avatar Nov 21 '20 05:11 livcheerful

A similar one: https://makecode.microbit.org/_EU25jxW2dR0V

(Win10, Chrome)

PilotFlying avatar Jan 03 '21 09:01 PilotFlying

Likely same underlying issue as: https://github.com/microsoft/pxt-microbit/issues/3579

darzu avatar Apr 08 '21 19:04 darzu

@abchatra , this is one that likely requires enhanced generics support in py2ts. See my additional thoughts in #3579.

darzu avatar Apr 09 '21 00:04 darzu

Still repros.

abchatra avatar May 20 '25 18:05 abchatra