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

user function return gets mad when returning undefined

Open jwunderl opened this issue 3 years ago • 0 comments

Describe the bug

We give an error message when the type of the return values in a user function does not match. This is a bit over-eager right now and doesn't handle return undefined/null nicely:

image

It doesn't harm anything / works just fine as it passes the compiler but it's annoying to see the error.

realistically this only currently occurs with the undefined block in jwunderl/arcade-sprite-util currently but it can occur in other cases too

To Reproduce Steps to reproduce the behavior:

  1. Go to https://makecode.com/_UiU8miPcKVFP
  2. See error

Expected behavior

Should not give error highlight when it's workin

jwunderl avatar Feb 15 '22 22:02 jwunderl