import Toybox.Lang; import Toybox.Graphics; import Toybox.WatchUi; function showToast(msg as String or ResourceId, options as { :icon as BitmapResource or BitmapReference or ResourceId } or Null) as Void { if (WatchUi has :showToast) { WatchUi.showToast(msg, options); } }
Error: Stack Overflow Error Details: Failed invoking <symbol> Stack:
- showToast() at Utils.mc:5 0x10000d92
- showToast() at Utils.mc:7 0x10000db7
...
I know some will tell me I shouldn't use the same function name that already exists, which I might do as a workaround, this still is a huge bug in the compiler.
What's more interesting is that it looks like there's another bug hiding here: vivoactive3 doesn't even have WatchUi.showToast, so the whole block should have been skipped altogether...
SDK 8.1.1, simulator, vivoactive3