Ticket Created
over 3 years ago

CIQQA-423

Compiler Bug: Background.exit() cannot be Array

When trying to pass an Array of Numbers to Background.exit()

Background.exit([1,2,3] as Array<Number>);

I get the following error:

Invalid 'Array<Number>' passed as parameter 1 of type
'PolyType<Null or Array<Application.PropertyValueType> or Boolean or Char or Dictionary<Boolean or Char or Double or Float or Long or Number or String,Application.PropertyValueType> or Double or Float or Long or Number or String or WatchUi.BitmapResource>'

But, the PolyType allows Array<Application.PropertyValueType> and PropertyValueType can be a Number.

Sample code here:

forums.garmin.com/.../a-very-simple-wf-with-a-background-that-talks-ble-to-the-thingy52

Parents
  • Unfortunately, 4.0.4 has no mention of fixing this bug and Garmin's bug tracking system is not public facing so there's no way to check on the status. The work-around is to turn off type-checking by removing the compile option or setting it to 0 (see above). Garmin's new typing system is quite ready for prime time but it has some usefulness.

Comment
  • Unfortunately, 4.0.4 has no mention of fixing this bug and Garmin's bug tracking system is not public facing so there's no way to check on the status. The work-around is to turn off type-checking by removing the compile option or setting it to 0 (see above). Garmin's new typing system is quite ready for prime time but it has some usefulness.

Children
No Data