Please consider improving the compiler by doing the constant folding earlier, so we can use code that is guarded by a constant:
(:no_foo) const FOO = false;
(:foo) const FOO = true;
class Foo {
(:foo) private var fooOnly as Boolean?;
function foo() as Void {
if (FOO) {
fooOnly = true;
}
}
}
monkey.jungle:
base.excludeAnnotations = foo
This code doesn't compile:
ERROR: fr955: Foo.mc:8,12: Undefined symbol ':fooOnly' detected.
However it could be a very useful feature if we were able to write code this way. Furthermore, apps compiled with the newest compiler (that would have this feature) could create smaller code for older devices as well.