I have an app with minApiLevel="1.2.0". It's used by a few hundred users only, so it's more than likely that none of them uses epix (gen1). I just did that, I "accidentally" ran it in the simulator, and got a runtime exception because use Array.slice that is only since CIQ 1.3.0. So of course this is my bug, but I wonder if it would be possible for the compiler to be a little bit smarter (that me and it's current version) and warn me about this? After all I use strict type check, it warns me about even things I can't fix (and that are not a bug at all), i.e:
WARNING: epix: MyDF/source/Config.mc:25,8: '$.Toybox.Application.AppBase.setProperty' is deprecated.
So instead of (or at least besides) these useless and annoying warnings, it could do some good and warn me when I compile for a device with lower CIQ level, that I use an api that will probably cause runtime exception. It's really possible in this case, as I just have:
function foo() as Array<Number> {
// ....
return arr.slice(0, n);
}
strict type check, no annotation to disable any check, and most importantly no has check, like: if (Array has :slice) ...
I realize it's a bit more complicated, as it'll have to fix existing bugs (like the above about setProperty, which is in the else block of: if(Application has :Properties ) but is this a realistic feature to ask for?