-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
Description
Problem Description
I've encountered an issue where if a defined constant is set to true, checking if it's false will return true, and then checking if it's set to true will also return true.
Happens on AIR version 51.3.1.1, happens on Windows. It might happen on Android too, I will check later.
Steps to Reproduce
- Set a constant to true. I'll be using
CONFIG::testfor this example. - Add code like this somewhere:
!CONFIG::test
{
trace("false");
}
CONFIG::test
{
trace("true");
}
- Compile and run. You will see both messages if the
CONFIG::testconstant is set to true, and only the "false" message if it's set tofalse.
Known Workarounds
You can define another constant that is the opposite of the constant you're trying to define, such as CONFIG::not_test, set it to true and check that. Not very clean, though.
Reactions are currently unavailable