Adobe-Runtime-Support
Adobe-Runtime-Support copied to clipboard
zero const number inside condition iOS
Hi, I've witnessed an annoying bug on iOS IPA build:
private static function doSomething():void
{
if ( isBooleanConditionMet )
{
const someVariable:Number = 2.5;
trace("variable = " + someVariable);// outputs "variable = 0"
}
}
Each time I assign const number inside a condition on iOS non-debug builds, it assigns 0. On Android and on iOS debug (via usb cable) everything works as intended.
IntelliJ IDEA, AIR 33.1.1.821, many iOS devices, reproduces 100% times
Changing const to var fixes the issue. Moving const outside a condition fixes as well.
That's a very weird one! Likely due to the AOT compiler, we'll take a look...
thanks